Parcourir la source

Merge branch 'sit'

xiaodai2022 il y a 2 ans
Parent
commit
22630b9cea

Fichier diff supprimé car celui-ci est trop grand
+ 10 - 0
dist/static/js/0.js


+ 19 - 5
src/apis/service/reportQuery/purchaseReport/index.js

@@ -21,17 +21,14 @@ export default {
    reportconsultbidssum: (data, params) => http(api + "reportconsultbidssum", data, "post", params),
    //采购员订单金额
    reportpurcheaseordersumbyuser: (data, params) => http(api + "reportpurcheaseordersumbyuser", data, "post", params),
-
    //已采反报价信息
    reportconsultinfobidssum: (data, params) => http(api + "reportconsultinfobidssum", data, "post", params),
    //已采反报价信息导出
    reportconsultinfobidssumexport: (data, params) => http(api + "reportconsultinfobidssumexport", data, "post", params),
-
    //未采反信息
    reportconsultinfobidssumnot: (data, params) => http(api + "reportconsultinfobidssumnot", data, "post", params),
    //未采反信息导出
    reportconsultinfobidssumnotexport: (data, params) => http(api + "reportconsultinfobidssumnotexport", data, "post", params),
-
    //订单明细
    reportorderlistdetailed: (data, params) => http(api + "reportorderlistdetailed", data, "post", params),
    //订单明细导出
@@ -44,7 +41,6 @@ export default {
    reportsupplierlist: (data, params) => http(api + "reportsupplierlist", data, "post", params),
    //供应商报表导出
    reportsupplierlistexport: (data, params) => http(api + "reportsupplierlistexport", data, "post", params),
-
    //退货流水报表
    reportsalereturnlist: (data, params) => http(api + "reportsalereturnlist", data, "post", params),
    //退货流水报表导出
@@ -57,5 +53,23 @@ export default {
    reportgoodofflinelist: (data, params) => http(api + "reportgoodofflinelist", data, "post", params),
    //产品下线报表导出
    reportgoodofflineexport: (data, params) => http(api + "reportgoodofflineexport", data, "post", params),
+
+   //产品修改报表
+   reportchangeloglist: (data, params) => http(api + "reportchangeloglist", data, "post", params),
+   //产品修改报表导出
+   reportchangelogeexport: (data, params) => http(api + "reportchangelogeexport", data, "post", params),
+
+
+
+
    
-};
+   //退货台账-业务口径导出
+   reportreturnexport: (data, params) => http(api + "reportreturnexport", data, "post", params),
+};
+
+
+
+
+
+
+

+ 3 - 1
src/views/orderEntry/orderEnter/index.vue

@@ -226,7 +226,9 @@
         </template>
         <template #operation="{ scope }">
           <el-tooltip
-            v-if="powers.some((item) => item == '007')"
+            v-if="
+              powers.some((item) => item == '007') && scope.row.status !== '5'
+            "
             effect="dark"
             content="详情"
             placement="top"

+ 35 - 48
src/views/purchaseIn/purchaseReturn/ShowDataTableColumns.js

@@ -2,92 +2,79 @@ export default [
   {
     prop: "returnCode",
     label: "采购退货单编号",
+    span: 6
   },
   {
     prop: "cgdNo",
     label: "采购单编号",
+    span: 6
   },
   {
     prop: "apply_name",
-    label: "申请人"
+    label: "申请人",
+    span: 6
   },
   {
-    prop: "class_cat",
-    label: "商品分类",
-  },
-  {
-    prop: "good_code",
-    label: "商品编码",
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    span: 6
   },
 
   {
-    prop: "good_name",
-    label: "商品名称",
-  },
-  {
-    prop: "wsm_supplier",
-    label: "供应商"
-  },
-  {
-    prop: "wsm_supplierNo",
-    label: "供应商编码"
+    prop: "good_num",
+    label: "总采购数量",
+    span: 6
   },
   {
-    prop: "remark",
-    label: "备注",
-    span:"24",
-    showProp:true
+    prop: "return_num",
+    label: "退货退货数量",
+    span: 6
   },
-
   {
-    prop: "goo_num",
-    label: "总采购数量",
-  },
- {
     prop: "good_price",
     label: "采购单价",
+    span: 6
   },
-
   {
-    prop: "return_num",
-    label: "退货退货数量",
+    prop: "return_price",
+    label: "退货总金额",
+    span: 6
   },
-
-  // {
-  //   prop: "good_price",
-  //   label: "商品单价",
-  // },
   {
-    prop: "good_total",
-    label: "退货总金额",
+    prop: "addtime",
+    label: "创建时间",
+    span: 6
   },
   {
     prop: "post_company",
     label: "物流公司",
-    showProp:true
+    span: 6
   },
   {
     prop: "post_code",
     label: "物流编号",
-    showProp:true
+    span: 12,
   },
   {
-    prop: "post_fee",
-    label: "物流费",
-    showProp:true
+    prop: "return_contactor",
+    label: "退货联系人",
+    span: 6
   },
   {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
+    prop: "return_mobile",
+    label: "退货联系电话",
+    span: 6
   },
   {
-    prop: "updatetime",
-    label: "更新时间",
+    prop: "return_addr",
+    label: "退货地址",
+    span: 12,
   },
   {
-    prop: "addtime",
-    label: "创建时间",
+    prop: "error_remark",
+    label: "退货备注",
+    span: 24,
   },
 ]
 

+ 15 - 109
src/views/purchaseIn/purchaseReturn/detail.vue

@@ -3,62 +3,6 @@
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <div class="detail-page-title">
-        <span>采购退货单编号:</span
-        ><span v-if="sitem">{{ sitem.bk_code }}</span>
-        <!-- <el-button
-          v-if="
-            powers.some((item) => item === '015') &&
-            (status === '0' || status === '1' || status === '2')
-          "
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
-          plain
-          class="fr"
-          :size="'mini'"
-          style="margin: 0 0 0 12px"
-          >作废该条信息</el-button
-        >
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          class="fr"
-          type="primary"
-          :size="'mini'"
-          v-if="status === '1' && powers.some((item) => item == '014')"
-          >取消备库申请</el-button
-        > -->
-      </div>
-
-      <!-- <el-button
-        @click="statusConfirm('-1', '作废该条信息')"
-        type="danger"
-        plain
-        style="margin: 0 0 0 12px"
-        class="fr"
-        :size="'mini'"
-        v-if="
-          status === '1' &&
-          powers.some((item) => item == '015')
-        "
-        >作废该条信息</el-button
-
-      > -->
-      <!-- <status-bar
-        v-if="newTime !== '' && status !== '4'"
-        :newTime="newTime"
-        :options="statusOptions"
-        :status="status"
-      /> -->
-
-      <!-- <add-edit
-        :sitem="sitem"
-        :id="queryId"
-        :newTime="newTime"
-        :type="'1'"
-        @refresh="initData"
-        v-if="newTime != ''"
-      /> -->
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse
@@ -87,66 +31,28 @@
                   ></el-tag>
                 </template>
               </show-data-table>
-              <!-- <purchase-order-addEdit
-            style="padding: 0 0 20px 0"
-            :newTime="newTime"
-            v-if="newTime !== ''"
-            :sitem="sitem"
-            :id="queryId"
-            @refresh="initData()"
-          /> -->
+        
             </el-collapse-item>
-
-            <!-- <el-collapse-item
-              title="业务审核"
-              name="1"
-              v-if="status == '1' && powers.some((item) => item == '043')"
-            >
-              <exam-form
-                :statusList="[]"
+            <el-collapse-item title="商品信息" name="1">
+                  <show-goods-data-table
                 :newTime="newTime"
                 v-if="newTime !== ''"
-                :disabled="false"
-                :isMust="false"
-                @searchChange="examForm"
+                :type="'1'"
+                :skucode="sitem.skuCode"
+                :spucode="sitem.spuCode"
+                :iscgd="true"
               />
             </el-collapse-item>
-
-            <el-collapse-item
-              title="通知财务部门"
-              name="1"
-              v-if="status == '2' && powers.some((item) => item == '039')"
-            >
-              <div style="height: 50px; padding: 0 0px 12px 0">
-                <el-button
-                  type="primary"
-                  class="fr"
-                  size="mini"
-                  @click="statusConfirm('3', '通知财务部门')"
-                  >我已知晓</el-button
-                >
-              </div>
-            </el-collapse-item> -->
-
-            <!-- <el-collapse-item name="3" title="填写退货物流" v-if="status == '2' && powers.some((item) => item == '032')">
-          <purchase-back
-            :sitem="sitem"
-            :id="queryId"
-            :newTime="newTime"
-            v-if="newTime != ''"
-            @refresh="initData"
-          />
-        </el-collapse-item> -->
           </el-collapse>
         </el-tab-pane>
-        <el-tab-pane label="审批记录" name="2">
+        <!-- <el-tab-pane label="审批记录" name="2">
           <process-time-line
             v-if="newTime !== ''"
             :newTime="newTime"
             :type="'CGTHD'"
             :orderCode="queryId"
           />
-        </el-tab-pane>
+        </el-tab-pane> -->
       </el-tabs>
     </div>
     <div v-else>
@@ -193,12 +99,12 @@ export default {
       loading: true,
       sitem: null,
       status: "",
-      // statusOptions: [
-      //   // { value: "0", label: "取消" },
-      //   { value: "1", label: "待业务审核" },
-      //   { value: "2", label: "通知财务部门" },
-      //   { value: "3", label: "采购退货成功" },
-      // ],
+      statusOptions: [
+        // { value: "0", label: "取消" },
+        // { value: "1", label: "待业务审核" },
+        // { value: "2", label: "通知财务部门" },
+        { value: "1", label: "采购退货成功" },
+      ],
     };
   },
   mounted() {

+ 180 - 238
src/views/purchaseIn/workbench/components/baseForm.vue

@@ -8,7 +8,6 @@
     v-loading="loading"
     label-width="85px"
     class="demo-ruleForm"
-    
   >
     <el-row>
       <el-col
@@ -32,8 +31,7 @@
 
           }} -->
           预计成本合计:<span>
-            
-            {{newPrice}}
+            {{ newPrice }}
           </span></span
         >
         <span
@@ -466,7 +464,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col :span="24" v-show="is_noble">
+      <el-col :span="24" v-show="pid === '6'">
         <el-col :span="6">
           <el-form-item label="金属重量" prop="noble_weight">
             <digital-input
@@ -505,6 +503,7 @@
               :disabled="type === 'view'"
               style="width: 100%"
               placeholder="启用金价"
+              @change="is_gold_price_change"
             >
               <el-option
                 v-for="group in options5"
@@ -624,25 +623,24 @@
           v-if="ruleForm.good_img"
           class="activity-upload"
         >
-          <div class="btnupload" style="position: relative; margin-left:10px;" v-for="(item,index) in ruleForm.good_img" :key=index>
-            <img
-
-              :src="ruleForm.good_img[index]"
-              class="avatar"
-            />
+          <div
+            class="btnupload"
+            style="position: relative; margin-left: 10px"
+            v-for="(item, index) in ruleForm.good_img"
+            :key="index"
+          >
+            <img :src="ruleForm.good_img[index]" class="avatar" />
             <i
-                        v-if="
-                          type == 'add' ||
-                          type === 'editBase' ||
-                          type === 'edit'
-                        "
-                        class="el-icon-close"
-                        @click="closeImg(index, 'good_img')"
-                      ></i>
-            
+              v-if="type == 'add' || type === 'editBase' || type === 'edit'"
+              class="el-icon-close"
+              @click="closeImg(index, 'good_img')"
+            ></i>
           </div>
           <div v-if="type == 'view' ? false : true">
-             <i  class="el-icon-plus avatar-uploader-icon" style="position: relative; width:50px;height:50px;">
+            <i
+              class="el-icon-plus avatar-uploader-icon"
+              style="position: relative; width: 50px; height: 50px"
+            >
               <file-upload
                 class="Upload"
                 :accept="'.jpg,.png,.jpeg'"
@@ -654,9 +652,6 @@
               ></file-upload>
             </i>
           </div>
-         
-           
-          
         </el-form-item>
         <!-- <i class="el-icon-plus avatar-uploader-icon">
           
@@ -724,6 +719,7 @@ export default {
 
   data() {
     return {
+      pid: "",
       cat_id_name: "",
       supplierNo: "",
       brand_name: "",
@@ -762,15 +758,11 @@ export default {
       r4: "",
 
       //成本合算
-      newPrice:0,
+      newPrice: 0,
     };
   },
   mounted() {
-    this.$nextTick(() => {});
     this.initForm();
-    
-    
-    // this.computedCost();
   },
   methods: {
     //图片悬浮删除
@@ -794,56 +786,6 @@ export default {
       m = Math.pow(10, Math.max(r1, r2));
       return (arg1 * m + arg2 * m) / m;
     },
-    // accAdd(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
-    //   var r1, r2, r3, r4, r5, r6, r7, m;
-    //   console.log(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-    //   try {
-    //     r1 = arg1.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r1 = 0;
-    //   }
-    //   try {
-    //     r2 = arg2.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r2 = 0;
-    //   }
-    //   try {
-    //     r3 = arg3.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r3 = 0;
-    //   }
-    //   try {
-    //     r4 = arg4.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r4 = 0;
-    //   }
-    //   try {
-    //     r5 = arg5.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r5 = 0;
-    //   }
-    //   try {
-    //     r6 = arg6.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r6 = 0;
-    //   }
-    //   try {
-    //     r7 = arg7.toString().split(".")[1].length;
-    //   } catch (e) {
-    //     r7 = 0;
-    //   }
-    //   m = Math.pow(10, Math.max(r1, r2, r3, r4, r5, r6, r7));
-    //   return (
-    //     (arg1 * m +
-    //       arg2 * m +
-    //       arg3 * m +
-    //       arg4 * m +
-    //       arg5 * m +
-    //       arg6 * m +
-    //       arg7 * m) /
-    //     m
-    //   );
-    // },
 
     //乘法精度问题
     accMul(arg1, arg2) {
@@ -881,7 +823,6 @@ export default {
     },
     async initForm() {
       this.supplierNo = [];
-      console.log(this.id);
       this.loading = true;
       if (this.type === "add") {
         this.title = "新建采返商品";
@@ -890,7 +831,6 @@ export default {
       } else {
         this.title = "采返商品详情";
       }
-      console.log(this.type);
       this.resetFormData();
       this.rulesThis = this.rules;
       await this.resetForm();
@@ -899,61 +839,44 @@ export default {
         await this.initData();
       }
       //调用实时金价获取接口
-        
-        this.golpricelast(this.ruleForm.metal_id)
-        //调用成本合算计算函数
-        // this.computedCost()
+      this.golpricelast();
+      //调用成本合算计算函数
+      // this.computedCost()
       this.setrules();
       this.loading = false;
     },
 
     computedCost() {
-      //        (this.ruleForm.demo_fee/this.askItem.num)+
-      //       (this.ruleForm.open_fee/this.askItem.num)+
-      //       (this.ruleForm.noble_weight*this.newGoldPrice)+
-      //       (this.ruleForm.cost_fee*this.ruleForm.noble_weight)+
-      //       this.ruleForm.pakge_fee+
-      //       this.ruleForm.mark_fee+
-      //       this.ruleForm.cert_fee+this.ruleForm.nake_fee+this.ruleForm.delivery_fee
-
-      //  let price = this.accDiv(this.ruleForm.demo_fee,this.askItem.num)
-      //  let price = this.accDiv(this.ruleForm.open_fee,this.askItem.num)
-
-      // console.log(this.askItem.num)
-      
-      this.$nextTick(() => {
-        this.r1 = this.accMul(this.ruleForm.noble_weight, this.newGoldPrice);
-        this.r2 = this.accMul(
-          this.ruleForm.cost_fee,
-          this.ruleForm.noble_weight
+      const { num } = this.askItem;
+      const {
+        demo_fee,
+        open_fee,
+        noble_weight,
+        cost_fee,
+        pakge_fee,
+        mark_fee,
+        cert_fee,
+        nake_fee,
+        delivery_fee,
+      } = this.ruleForm;
+      let a = this.accDiv(demo_fee, num); // 打样费/购买数量
+      let b = this.accDiv(open_fee, num); //开模费/购买数量
+      let c = this.accMul(noble_weight, this.newGoldPrice); //金属重量* 最新金价
+      let d = this.accMul(cost_fee, noble_weight); //工艺费* 金属重量
+      let e = this.accAdd(pakge_fee, mark_fee); //包装费+加标费
+      let f = this.accAdd(cert_fee, nake_fee); //证书费+产品裸价
+      if (this.is_noble) {
+        this.newPrice = this.accAdd(
+          this.accAdd(this.accAdd(a, b), this.accAdd(c, d)),
+          this.accAdd(this.accAdd(e, f), delivery_fee)
         );
-        this.r3 = this.accDiv(this.ruleForm.demo_fee, this.askItem.num);
-        this.r4 = this.accDiv(this.ruleForm.open_fee, this.askItem.num);
-
-        // this.accAdd(this.r1,this.r2)
-        // this.accAdd(this.r3,this.r4)
-        // this.accAdd(this.ruleForm.pakge_fee,this.ruleForm.mark_fee)
-        // this.accAdd(this.ruleForm.cert_fee,this.ruleForm.nake_fee)
-        // this.accAdd(this.ruleForm.delivery_fee,)
-
-       let price =  this.accAdd(
-            this.ruleForm.delivery_fee,
-            this.accAdd(
-              this.accAdd(
-                this.accAdd(
-                  this.accAdd(this.r1, this.r2),
-                  this.accAdd(this.r3, this.r4)
-                ),
-                this.accAdd(this.ruleForm.pakge_fee, this.ruleForm.mark_fee)
-              ),
-              this.accAdd(this.ruleForm.cert_fee, this.ruleForm.nake_fee)
-            )
-          );
-          price = price.toFixed(2)
-
-          this.newPrice = price;
-          console.log("aaaaaaaaaaaaaaaaaaa",price)
-      });
+      } else {
+        this.newPrice = this.accAdd(
+          this.accAdd(this.accAdd(a, b), this.accAdd(e, f)),
+          delivery_fee
+        );
+      }
+      console.log(new Date().valueOf() + this.newPrice);
     },
 
     number_change(e, key) {
@@ -966,7 +889,6 @@ export default {
       const { code, message, data } = await asyncRequest.good_detail({
         bidNo: this.editId,
       });
-      console.log(data);
       if (code === 0) {
         const {
           bidNo,
@@ -1016,12 +938,15 @@ export default {
         this.cat_id_name = "";
         if (cat_info && cat_info.length) {
           cat_info.forEach((e, ei) => {
+            if (ei === 0) {
+              this.pid = e.id;
+            }
             this.cat_id_name += `${ei !== 0 ? "_" : ""}${e.name}`;
           });
         }
         this.supplierNo_name = supplierName || "";
-        console.log(this.supplierNo_name);
-        this.is_noble = this.askItem.is_metal;
+        this.is_noble = is_gold_price === "1" && this.pid === "6";
+        // this.is_noble = this.askItem.is_metal;
         this.brand_name = brand_name || "";
         this.unit_name = unit || "";
         this.ruleForm = {
@@ -1042,7 +967,6 @@ export default {
           origin_place: origin_place ? origin_place.split(",") : [],
           delivery_place: delivery_place ? delivery_place.split(",") : [],
 
-          
           cert_fee: cert_fee || "0.00",
           pakge_fee: pakge_fee || "0.00",
           cost_fee: cost_fee || "0.00",
@@ -1069,8 +993,6 @@ export default {
         if (this.is_noble) {
           this.ruleForm.nake_fee = "0";
         }
-        
-        
       } else if (code >= 100 && code <= 104) {
         await this.logout();
       } else {
@@ -1078,61 +1000,66 @@ export default {
       }
     },
     async submitForm() {
-      if(this.ruleForm.good_img.length>10){
-        this.$message.warning("上传图片不能超过10张")
+      if (this.is_noble) {
+        this.ruleForm.nake_fee = "0";
+      }
+       this.computedCost();
+      if (this.ruleForm.good_img.length > 10) {
+        this.$message.warning("上传图片不能超过10张");
         return;
       }
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          this.loading = true;
-          if (this.spec_tableData.length === 0) {
-            this.$message.warning("请填写规格!");
-            this.loading = false;
-            return;
-          }
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.cat_id = model.cat_id[model.cat_id.length - 1];
-          model.brandid = model.brandid.toString();
-          model.supplierNo = model.supplierNo.toString();
-          model.origin_place = model.origin_place.toString();
-          model.delivery_place = model.delivery_place.toString();
+          if (!this.loading) {
+            this.loading = true;
+            if (this.spec_tableData.length === 0) {
+              this.$message.warning("请填写规格!");
+              this.loading = false;
+              return;
+            }
+            let model = JSON.parse(JSON.stringify(this.ruleForm));
+            model.cat_id = model.cat_id[model.cat_id.length - 1];
+            model.brandid = model.brandid.toString();
+            model.supplierNo = model.supplierNo.toString();
+            model.origin_place = model.origin_place.toString();
+            model.delivery_place = model.delivery_place.toString();
 
-          
-          model.unit_id = model.unit_id.toString();
-          model.config = model.config.toString();
-          model.tax = parseInt(model.tax + "") + "";
-          model.specinfo = [];
-          let list = JSON.parse(JSON.stringify(this.spec_tableData));
-          list.forEach((a) => {
-            let am = {
-              specid: a.specid,
-              spec_value_id: a.spec_value_id,
-            };
-            model.specinfo.push(am);
-          });
-          console.log(model);
-          let res = {};
-          if (this.type === "add") {
-            delete model["bidNo"];
-            res = await asyncRequest.good_add(model);
-          } else {
-            res = await asyncRequest.good_update(model);
-          }
-          console.log(res);
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.type === "add" ? "新建成功!" : "修改成功!";
-            this.$notify.success({
-              title: title,
-              message: "",
+            model.unit_id = model.unit_id.toString();
+            model.config = model.config.toString();
+            model.tax = parseInt(model.tax + "") + "";
+            model.specinfo = [];
+            let list = JSON.parse(JSON.stringify(this.spec_tableData));
+            list.forEach((a) => {
+              let am = {
+                specid: a.specid,
+                spec_value_id: a.spec_value_id,
+              };
+              model.specinfo.push(am);
             });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
+            console.log(model);
+            let res = {};
+            if (this.type === "add") {
+              delete model["bidNo"];
+              res = await asyncRequest.good_add(model);
+            } else {
+              res = await asyncRequest.good_update(model);
+            }
+            console.log(res);
+            this.loading = false;
+            if (res && res.code === 0) {
+              const title = this.type === "add" ? "新建成功!" : "修改成功!";
+              this.$notify.success({
+                title: title,
+                message: "",
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
           }
         } else {
           console.log("error submit!!");
@@ -1149,14 +1076,23 @@ export default {
           this.$refs.ruleForm.clearValidate();
           this.spec_tableData = [];
           console.log(this.askItem);
-          // const { can_id_arr } = this.askItem;
-          this.is_noble = this.askItem.is_metal;
+          this.is_noble = false;
+          const { can_id_arr, is_gold_price } = this.askItem;
+          can_id_arr.forEach((e, index) => {
+            if (index == 0) {
+              this.pid = e;
+            }
+          });
+          if (this.pid === "6" && is_gold_price === "1") {
+            this.is_noble = true;
+          }
           this.cat_id_name = this.type === "add" ? this.askItem.can_name : "";
-
           this.brand_name = "";
           // this.type === "add" ? this.askItem.brand : "";
           this.unit_name = "";
-          let good_img = this.askItem.good_img ? this.askItem.good_img.split(",") : []
+          let good_img = this.askItem.good_img
+            ? this.askItem.good_img.split(",")
+            : [];
           //this.type === "add" ? this.askItem.unit_name : "";
           this.ruleForm = {
             infoNo: this.id || "",
@@ -1176,7 +1112,7 @@ export default {
             tax: "",
             supply_area: "",
             origin_place: [],
-            delivery_place:[],
+            delivery_place: [],
             cert_fee: "0.00",
             pakge_fee: "0.00",
             cost_fee: "0.00",
@@ -1240,26 +1176,38 @@ export default {
     //分类选择
     async cat_id_change(e) {
       const { pid, id, label } = e;
+      this.pid = pid || "";
       this.ruleForm.cat_id = id ? [id] : [];
-      this.is_noble = pid === "6";
+
       this.$refs.ruleForm.validateField("cat_id");
+      const { is_gold_price } = this.ruleForm;
+      this.is_noble = this.pid === "6" && is_gold_price === "1";
       this.setrules();
-      this.ruleForm.nake_fee = "0";
+      if (this.is_noble) {
+        this.ruleForm.nake_fee = "0";
+      }
+      this.computedCost();
     },
     setrules() {
-      let list = [
-        "noble_weight",
-        "metal_id",
-        "is_gold_price",
-        "is_diff",
-        "config",
-        "other_config",
-      ];
-      for (let i = 0; i < list.length; i++) {
-        this.rules[list[i]][0].required = this.is_noble;
+      let list1 = ["noble_weight", "is_gold_price", "is_diff"];
+      for (let i = 0; i < list1.length; i++) {
+        this.rules[list1[i]][0].required = this.is_noble;
+      }
+      let list2 = ["metal_id", "config", "other_config"];
+      for (let i = 0; i < list2.length; i++) {
+        this.rules[list2[i]][0].required = this.pid === "6";
       }
     },
-
+    is_gold_price_change() {
+      const { is_gold_price } = this.ruleForm;
+      this.$refs.ruleForm.validateField("is_gold_price");
+      this.is_noble = this.pid === "6" && is_gold_price === "1";
+      this.setrules();
+      if (this.is_noble) {
+        this.ruleForm.nake_fee = "0";
+      }
+      this.computedCost();
+    },
     //品牌选择
     brandidsearchChange(e) {
       const { id, code, label } = e;
@@ -1299,7 +1247,6 @@ export default {
     //金属种类选择
     //需修改,未改完
     async metal_idsearchChange(e) {
-      
       this.loading = true;
       const { id, code, label } = e;
       if (id) {
@@ -1308,39 +1255,36 @@ export default {
         this.ruleForm.metal_id = "";
       }
       this.$refs.ruleForm.validateField("metal_id");
-      
 
       //获取实时金价
-      this.golpricelast(e.id)
-      
+      this.golpricelast();
+
       this.loading = false;
     },
     //获取实时金价
-    async golpricelast(id){
-      
-      if (!id) {
-        // this.ruleForm.metal_id = this.askItem.gold_price;
-        // console.log(this.ruleForm.metal_id ,"1111111111111111111111")
-        
+    async golpricelast() {
+      const { metal_id } = this.ruleForm;
+      if (metal_id === "" && metal_id === "0") {
         this.newGoldPrice = 0;
+        this.computedCost();
         return;
       }
-      const res = await asyncRequest.golpricelast({ type: id });
-      console.log(res)
-      if (res && res.code === 0) {
-        if(res.data.length<=0){
+      const { code, data } = await asyncRequest.golpricelast({
+        type: metal_id,
+      });
+      if (code === 0) {
+        if (data.length !== 1) {
           this.newGoldPrice = 0;
-        }else{
-          this.newGoldPrice = res.data[0].price;
+        } else {
+          this.newGoldPrice = data[0].price;
         }
-        
-
-        this.computedCost();
-        
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
+        this.newGoldPrice = 0;
         await this.logout();
       } else {
+        this.newGoldPrice = 0;
       }
+      this.computedCost();
     },
 
     //仓库省市区
@@ -1354,8 +1298,6 @@ export default {
       this.$refs.ruleForm.validateField("delivery_place");
     },
 
-    
-
     //图片上传成功
     async UploadSuccessEventgood_img(data) {
       await this.UploadSuccessEvent(1, data);
@@ -1363,8 +1305,8 @@ export default {
 
     //图片上传成功
     async UploadSuccessEvent(type, data) {
-      if(this.ruleForm.good_img.length>10){
-        this.$message.warning("上传图片最多不能超过10张")
+      if (this.ruleForm.good_img.length > 10) {
+        this.$message.warning("上传图片最多不能超过10张");
         return;
       }
       const { url } = data;
@@ -1378,7 +1320,7 @@ export default {
           this.ruleForm.good_img.push(url);
           this.$refs.ruleForm.validateField("good_img");
         }
-        console.log(this.ruleForm.good_img.length)
+        console.log(this.ruleForm.good_img.length);
         this.$message.success("图片上传成功!");
       }
     },
@@ -1437,7 +1379,7 @@ export default {
         tax: "",
         supply_area: "",
         origin_place: [],
-        delivery_place:[],
+        delivery_place: [],
         cert_fee: "0.00",
         pakge_fee: "0.00",
         cost_fee: "0.00",
@@ -1482,7 +1424,7 @@ export default {
         tax: "",
         supply_area: "",
         origin_place: [],
-        delivery_place:[],
+        delivery_place: [],
         cert_fee: "0.00",
         pakge_fee: "0.00",
         cost_fee: "0.00",
@@ -1523,14 +1465,14 @@ export default {
   }
 }
 i.el-icon-close {
-            position: absolute;
-            z-index: 2;
-            top: 0;
-            right: 0;
-            color: #63cbe7;
-            font-weight: bold;
-            cursor: pointer;
-          }
+  position: absolute;
+  z-index: 2;
+  top: 0;
+  right: 0;
+  color: #63cbe7;
+  font-weight: bold;
+  cursor: pointer;
+}
 
 // /deep/ .fileUp {
 //       opacity: 10 !important;

+ 542 - 6
src/views/reportQuery/purchaseReport/components/columns.js

@@ -711,30 +711,38 @@ const table13 = [
     _noset_: true
   },
   {
-    prop: "date",
+    prop: "addtime",
     label: "产品操作时间",
     minWidth: "155px",
   },
   {
-    prop: "total",
+    prop: "creater",
     label: "采购维护人",
     minWidth: "155px",
   },
   {
-    prop: "total",
+    prop: "code",
     label: "产品编号(spuCode)",
     minWidth: "155px",
   },
   {
-    prop: "total",
+    prop: "good_name",
     label: "产品名称",
     minWidth: "155px",
   },
   {
-    prop: "total",
+    prop: "name",
     label: "供应商名称",
     minWidth: "155px",
   },
+  {
+    prop: "",
+    label: "变更",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
 ]
 
 
@@ -833,4 +841,532 @@ const table14 = [
   },
 
 ]
-export { table1, table2, table3, table4, table5,table6,table7,table8,table9,table10,table11,table12,table13,table14}
+
+//产品修改报表
+const table15 = [
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
+  {
+    type: "selection",
+    fixed: "left",
+    _noset_: true
+  },
+  
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "80px",
+    _slot_: "operation",
+  },
+]
+
+
+//产品修改报表,修改具体内容
+const editTable13 = [
+  // {
+  //   prop: "id",
+  //   label: "id",
+  //   minWidth: "155px",
+  // },
+  {
+    prop: "bidNo",
+    label: "返库商品编号",
+    minWidth: "200px",
+  },
+
+
+
+  {
+    prop: "infoNo",
+    label: "阶梯编号",
+    minWidth: "200px",
+  },
+  {
+    prop: "zxNo",
+    label: "咨询编号",
+    minWidth: "200px",
+  },
+  {
+    prop: "spuCode",
+    label: "spu商品code",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "brandid",
+    label: "商品品牌",
+    minWidth: "200px",
+  },
+  {
+    prop: "brand_id",
+    label: "商品品牌",
+    minWidth: "200px",
+  },
+  {
+    prop: "cat_id",
+    label: "商品分类",
+    minWidth: "200px",
+  },
+  {
+    prop: "specinfo",
+    label: "规格集合",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "cost_desc",
+    label: "工艺描述",
+    minWidth: "200px",
+  },
+  {
+    prop: "work_day",
+    label: "工期",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_day",
+    label: "物流时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_img",
+    label: "商品主图",
+    minWidth: "200px",
+  },
+  {
+    prop: "expire_day",
+    label: "有效时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "origin_place",
+    label: "产地",
+    minWidth: "200px",
+  },
+  {
+    prop: "supplierNo",
+    label: "供应商",
+    minWidth: "200px",
+  },
+  {
+    prop: "pay_way",
+    label: "支付方式",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "send_way",
+    label: "发货方式",
+    minWidth: "200px",
+  },
+  {
+    prop: "metal_id",
+    label: "金属种类",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_gold_price",
+    label: "是否启用实时金价",
+    minWidth: "200px",
+  },
+  {
+    prop: "config",
+    label: "配置要求",
+    minWidth: "200px",
+  },
+  {
+    prop: "weight",
+    label: "商品总重量",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_diff",
+    label: "有无工差",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "demo_fee",
+    label: "打样费",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_fee",
+    label: "物流费",
+    minWidth: "200px",
+  },
+  {
+    prop: "open_fee",
+    label: "开模费",
+    minWidth: "200px",
+  },
+  {
+    prop: "pakge_fee",
+    label: "打包费",
+    minWidth: "200px",
+  },
+  {
+    prop: "nake_fee",
+    label: "裸价",
+    minWidth: "200px",
+  },
+  {
+    prop: "mark_fee",
+    label: "加标费",
+    minWidth: "200px",
+  },
+  {
+    prop: "cert_fee",
+    label: "证书费",
+    minWidth: "200px",
+  },
+  {
+    prop: "cost_fee",
+    label: "工艺费",
+    minWidth: "200px",
+  },
+  {
+    prop: "total_fee",
+    label: "成本总计",
+    minWidth: "200px",
+  },
+  {
+    prop: "supply_area",
+    label: "供货区域",
+    minWidth: "200px",
+  },
+  {
+    prop: "remark",
+    label: "备注",
+    minWidth: "200px",
+  },
+  {
+    prop: "sale_price",
+    label: "最终售价",
+    minWidth: "200px",
+  },
+  {
+    prop: "createrid",
+    label: "创建人id",
+    minWidth: "200px",
+  },
+  {
+    prop: "creater",
+    label: "创建人",
+    minWidth: "200px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    minWidth: "200px",
+  },
+  
+  {
+    prop: "unit",
+    label: "单位",
+    minWidth: "200px",
+  },
+  {
+    prop: "cat_info",
+    label: "分类",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "supplierName",
+    label: "供应商名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "metal_name",
+    label: "贵金属名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_place",
+    label: "发货地",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_code",
+    label: "商品code",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_unit",
+    label: "商品单位",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_type",
+    label: "是否定制",
+    minWidth: "200px",
+  },
+  {
+    prop: "companyNo",
+    label: "业务企业",
+    minWidth: "200px",
+  },
+  {
+      prop: "company_id",
+      label: "业务公司",
+      minWidth: "200px",
+    },
+  {
+    prop: "moq",
+    label: "定制起订量",
+    minWidth: "200px",
+  },
+  {
+    prop: "customized",
+    label: "定制工期",
+    minWidth: "200px",
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "is_auth",
+    label: "销售权限",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    minWidth: "200px",
+  },
+  {
+    prop: "auth_img",
+    label: "销售授权图片",
+    minWidth: "200px",
+  },
+
+
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    minWidth: "200px",
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_size",
+    label: "商品尺寸",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_list",
+    label: "包装清单",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    minWidth: "200px",
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    minWidth: "200px",
+  },
+  {
+    prop: "sample_fee",
+    label: "调样费",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_thumb_img",
+    label: "商品缩略图",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_info_img",
+    label: "详情介绍",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "is_del",
+    label: "是否删除",
+    minWidth: "200px",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "updatetime",
+    label: "更新时间",
+    minWidth: "200px",
+  },
+  //////////////////////////////
+  {
+    prop: "is_exclusive",
+    label: "专属类型",
+    minWidth: "200px",
+  },
+  {
+      prop: "noble_weight",
+      label: "贵金属重量",
+      minWidth: "200px",
+    },
+    {
+      prop: "noble_metal",
+      label: "贵金属种类",
+      minWidth: "200px",
+    },
+    {
+      prop: "other_config",
+      label: "其他配置要求",
+      minWidth: "200px",
+    },
+    {
+      prop: "spec_value",
+      label: "规格类型",
+      minWidth: "200px",
+    },
+    {
+      prop: "spec_value_value",
+      label: "规格值",
+      minWidth: "200px",
+    },
+    {
+      prop: "market_price",
+      label: "市场价",
+      minWidth: "200px",
+    },
+    {
+      prop: "cgd_gold_price",
+      label: "供应商采购金价",
+      minWidth: "200px",
+    },
+    {
+      prop: "noble_price",
+      label: "当前金价",
+      minWidth: "200px",
+    },
+    {
+      prop: "min_num",
+      label: "起订量(>=)",
+      minWidth: "200px",
+    },
+    {
+      prop: "package_fee",
+      label: "包装费",
+      minWidth: "200px",
+    },
+    {
+      prop: "other_fee",
+      label: "其他费用",
+      minWidth: "200px",
+    },
+    {
+      prop: "nake_total",
+      label: "成本合计",
+      minWidth: "200px",
+    },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+  //   {
+  //     prop: "测试",
+  //     label: "测试",
+  //     minWidth: "200px",
+  //   },
+
+ 
+
+
+  /////////////////////////////
+
+
+
+
+]
+
+
+export { table1, table2, table3, table4, table5,table6,table7,table8,table9,table10,table11,table12,table13,editTable13,table14,table15}

+ 293 - 125
src/views/reportQuery/purchaseReport/components/table13.vue

@@ -1,107 +1,225 @@
 <template>
-    <div>
-      <ex-table
-        v-loading="loading"
-        :table="table"
-        :data="tableData"
-        :columns="table13"
-        :page="pageInfo"
-        :size="size"
-        @page-curr-change="handlePageChange"
-        @page-size-change="handleSizeChange"
-        @screen-reset="
-          pageInfo.curr = 1;
-          parmValue.page = 1;
-          searchList();
-        "
-        @screen-submit="
-          pageInfo.curr = 1;
-          parmValue.page = 1;
-          searchList();
-        "
-        @selection="selection_change"
-      >
-        <template #table-header="{}">
-          <div style="width: 100%">
-            <el-row style="padding: 0 0 0 80px">
-             
-               <el-col :span="6" style="width: 463px;">
-                <periodDatePickerActive
-                      :start="parmValue.start_date"
-                      :end="parmValue.end_date"
-                      :placeholder="'产品操作'"
-                      :width="'205px'"
-                      :size="searchSize"
-                      @timeReturned="time"
-                    />
-              </el-col>  
-              <el-col :span="4" style="width: 66px; float: right">       
-                <el-button type="primary" style="margin-left:30px;" @click="download" :size="searchSize"  class="fr">
-                    导出
-                </el-button>
-              </el-col>
-              <el-col :span="3" style="width: 66px; float: right">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
-                >
-                  刷新
-                </el-button>
-              </el-col>
-              
-            </el-row>
-            <el-row style="padding: 10px 0 0 0" gutter="10">
-              <el-col :span="6" style="width: 240px">
-                <el-input
-                  clearable
-                  placeholder="采购维护人"
-                  v-model="parmValue.xiugai1"
-                  maxlength="40"
-                  :size="searchSize"
-                  @blur="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                </el-input>
-              </el-col>
-              <el-col :span="6" style="width: 240px">
-                <el-input
-                  clearable
-                  placeholder="供应商名称"
-                  v-model="parmValue.xiugai2"
-                  maxlength="40"
-                  :size="searchSize"
-                  @blur="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                </el-input>
-              </el-col>
-              <el-col :span="4" style="width: 66px; float: right">
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
-                >
-                  重置
-                </el-button>
-              </el-col>     
-            </el-row>
-          </div>
-       </template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table13"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 463px">
+              <periodDatePickerActive
+                :start="parmValue.start_date"
+                :end="parmValue.end_date"
+                :placeholder="'产品操作'"
+                :width="'205px'"
+                :size="searchSize"
+                @timeReturned="time"
+              />
+            </el-col>
+            <el-col :span="4" style="width: 66px; float: right">
+              <el-button
+                type="primary"
+                style="margin-left: 30px"
+                @click="download"
+                :size="searchSize"
+                class="fr"
+              >
+                导出
+              </el-button>
+            </el-col>
+            <el-col :span="3" style="width: 66px; float: right">
+              <el-button
+                :size="searchSize"
+                type="primary"
+                style="float: right; margin-left: 5px"
+                @click="searchList"
+              >
+                刷新
+              </el-button>
+            </el-col>
+          </el-row>
+          <el-row style="padding: 10px 0 0 0" gutter="10">
+            <el-col :span="6" style="width: 240px">
+              <el-input
+                clearable
+                placeholder="采购维护人"
+                v-model="parmValue.creater"
+                maxlength="40"
+                :size="searchSize"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+              </el-input>
+            </el-col>
+            <el-col :span="6" style="width: 240px">
+              <el-input
+                clearable
+                placeholder="供应商名称"
+                v-model="parmValue.supplier_name"
+                maxlength="40"
+                :size="searchSize"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+              </el-input>
+            </el-col>
+            <el-col :span="4" style="width: 66px; float: right">
+              <el-button
+                type="warning"
+                class="fr"
+                :size="searchSize"
+                @click="restSearch"
+              >
+                重置
+              </el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
 
-        
-      </ex-table>
-    </div>
+      <template #operation="{ scope }">
+        <el-tooltip effect="dark" content="修改内容对比" placement="top">
+          <i class="el-icon-view tb-icon" @click="dlgTable(scope.row)"></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
 
-  
+    <el-dialog
+      title="产品修改差异对比"
+      :visible.sync="dialogTableVisible"
+      :center="true"
+      align="left"
+      top="3vh"
+      width="1040px"
+      :close-on-click-modal="false"
+      element-loading-text="拼命加载中"
+      element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)"
+      @close="dialogTableVisible = false"
+    >
+      <el-table
+        :data="showData"
+        :size="searchSize"
+        border
+        stripe
+        max-height="750px"
+        style="width: 100%; margin: -20px 0 0"
+      >
+        <el-table-column
+          prop="key_name"
+          label="修改字段名称"
+          width="130px"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="key"
+          label="修改字段"
+          width="130px"
+          show-overflow-tooltip
+        />
+        <el-table-column prop="before" label="修改前" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div v-if="scope.row.key === 'good_img'">
+              <img
+                v-for="(si, sii) in scope.row.before"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                class="fl"
+                v-viewer
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_info_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_thumb_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else>{{ scope.row.before }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="after" label="修改后" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div v-if="scope.row.key === 'good_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_info_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_thumb_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else>{{ scope.row.after }}</div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
 </template>
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
@@ -109,36 +227,38 @@ import resToken from "@/mixins/resToken";
 import urlConfig from "@/apis/url-config";
 import asyncRequest from "@/apis/service/reportQuery/purchaseReport";
 import periodDatePickerActive from "../period-date-picker/main.vue";
-import { table13} from "./columns";
+import { table13, editTable13 } from "./columns";
 import { mapGetters } from "vuex";
 
 export default {
   name: "purchaseOrder",
   mixins: [mixinPage, resToken],
   components: {
-    periodDatePickerActive
+    periodDatePickerActive,
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    
   },
   data() {
     return {
+      editOld: {},
+      editNew: {},
+      dialogTableVisible: false,
       //选中数组
       changeList: [],
+      showData: [],
       //全局url
       fileUrl: urlConfig.baseURL,
       //loading
       loading: false,
       //请求参数集合
       parmValue: {
-        xiugai1:"", //咨询订单号
-        xiugai2:"",
+        creater: "", //采购维护人
+        supplier_name: "", // 供应商名称
         start_date: "", //起始时间
         end_date: "", // 结束时间
         page: 1, // 页码
         size: 15, // 每页显示条数
-       
       },
       // 表格 - 数据集合
       tableData: [],
@@ -154,16 +274,55 @@ export default {
         curr: 1,
         total: 0,
       },
-      // 表格表头 - 列参数
+
       table13: table13,
+      editTable13,
     };
   },
   mounted() {
-
     this.searchList();
   },
 
   methods: {
+    dlgTable(row) {
+      this.showData = [];
+      const { before_info, after_info } = row;
+
+      let keyList = [];
+      for (let key in after_info) {
+        keyList.push(key);
+      }
+
+      for (let i = 0; i < keyList.length; i++) {
+        
+        let model = {
+          key: keyList[i],
+          key_name:
+            (editTable13.find((s) => s.prop === keyList[i]) || {}).label ||
+            "--",
+          before: this.get_key_value(keyList[i], before_info),
+          after: this.get_key_value(keyList[i], after_info),
+        };
+        // console.log(model.key_name)
+        this.showData.push(model);
+      }
+      this.dialogTableVisible = true;
+    },
+    get_key_value(key, info) {
+      if (key === "good_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      else if(key === "good_info_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      else if(key === "good_thumb_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      // else if(key === "cat_id") {
+      //   return info[key] ? (info[key] || "").split(",") : [];
+      // }
+      return info[key];
+    },
     //初始化http请求
     async searchList() {
       if (
@@ -173,10 +332,10 @@ export default {
         this.$message.warning("时间区间不完整!");
         return;
       }
-      return;
+      // return;
       this.loading = true;
-      
-      const res = await asyncRequest.list(this.parmValue);
+      const res = await asyncRequest.reportchangeloglist(this.parmValue);
+      console.log(res);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
@@ -185,13 +344,16 @@ export default {
       } else {
         this.tableData = [];
         this.pageInfo.total = 0;
+        this.$message.warning(res.message);
       }
       this.loading = false;
     },
-   
+
     //重置
     restSearch() {
       this.parmValue = {
+        creater: "", //采购维护人
+        supplier_name: "", // 供应商名称
         start_date: "", //新建起始时间
         end_date: "", // 新建结束时间
         page: 1, // 页码
@@ -205,7 +367,7 @@ export default {
       };
       this.searchList();
     },
-    
+
     // 时间函数
     async time(e) {
       this.parmValue.start_date = e.startTime || "";
@@ -213,13 +375,13 @@ export default {
       await this.searchList();
     },
 
-     //选中触发函数
+    //选中触发函数
     selection_change(e) {
       const { list } = e;
       //选中的数组集合
       this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
     },
-    //导出文件 
+    //导出文件
     async download() {
       // if(this.changeList.length<=0){
       //   this.$message.warning("请选择有效数据")
@@ -228,23 +390,23 @@ export default {
       let start_date = new Date(this.parmValue.start_date).valueOf();
       let end_date = new Date(this.parmValue.end_date).valueOf();
       let flag = end_date - start_date > 30 * 24 * 60 * 60 * 1000;
-      if(this.parmValue.start_date != "" && this.parmValue.end_date != ""){
-        if(flag){
-          this.$message.warning("导出文件的时间区间不能超过30天")
+      if (this.parmValue.start_date != "" && this.parmValue.end_date != "") {
+        if (flag) {
+          this.$message.warning("导出文件的时间区间不能超过30天");
           return;
         }
-      }else{
-        this.$message.warning("请选择导出文件的时间区间")
+      } else {
+        this.$message.warning("请选择导出文件的时间区间");
         return;
       }
-      let model = JSON.parse(JSON.stringify(this.parmValue))
+      let model = JSON.parse(JSON.stringify(this.parmValue));
       // model.is_export = 1;
       if (!this.loading) {
         this.loading = true;
         let httpType = `aplication/zip`;
         axios({
           method: "post",
-          url: this.fileUrl + "admin/reportgoodofflineexport",
+          url: this.fileUrl + "admin/reportchangelogeexport",
           responseType: "blob",
           data: model,
           headers: {
@@ -261,13 +423,13 @@ export default {
               let url = window.URL.createObjectURL(
                 new Blob([res.data], {
                   // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
-                  type: httpType
+                  type: httpType,
                 })
               );
               let link = document.createElement("a");
               link.style.display = "none";
               link.href = url;
-              let excelName = "产品下线报表.zip";
+              let excelName = "产品修改报表.zip";
               link.setAttribute("download", excelName);
               document.body.appendChild(link);
               link.click();
@@ -297,5 +459,11 @@ export default {
 .purchaseOrder {
   // text-align: right;
 }
+/deep/ .el-dialog {
+  width: 80%;
+  // height: 50vh;
+  min-width: 800px;
+  min-height: 500px;
+}
 </style>
    

+ 1 - 1
src/views/reportQuery/purchaseReport/components/table14.vue

@@ -183,7 +183,7 @@ export default {
     };
   },
   mounted() {
-
+    alert("暂无数据,未修改")
     this.searchList();
   },
 

+ 332 - 0
src/views/reportQuery/purchaseReport/components/table15.vue

@@ -0,0 +1,332 @@
+<template>
+    <div>
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="table15"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @selection="selection_change"
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+             
+               <el-col :span="6" style="width: 383px;">
+                <periodDatePickerActive
+                      :start="parmValue.start_date"
+                      :end="parmValue.end_date"
+                      :placeholder="'出入库'"
+                      :width="'175px'"
+                      :size="searchSize"
+                      @timeReturned="time"
+                    />
+              </el-col>  
+              <el-col :span="6" style="width: 150px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.select"
+                  filterable
+                  clearable
+                  placeholder="出入库类型"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option label="假的" value="1"></el-option>
+                    <el-option label="假的" value="2"></el-option>
+                    <el-option label="假的" value="3"></el-option>
+                    <el-option label="假的" value="4"></el-option>
+                    <el-option label="假的" value="5"></el-option>
+                    <el-option label="假的" value="6"></el-option>
+                    <el-option label="假的" value="7"></el-option>
+                </el-select>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">       
+                <el-button type="primary" style="margin-left:30px;" @click="download" :size="searchSize"  class="fr">
+                    导出
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              
+            </el-row>
+            <el-row style="padding: 10px 0 0 0" gutter="10">
+              <el-col :span="6" style="width: 240px">
+                <el-input
+                  clearable
+                  placeholder="产品名称"
+                  v-model="parmValue.xiugai1"
+                  maxlength="40"
+                  :size="searchSize"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                </el-input>
+              </el-col>
+              <el-col :span="6" style="width: 240px">
+                <el-input
+                  clearable
+                  placeholder="产品编码"
+                  v-model="parmValue.xiugai2"
+                  maxlength="40"
+                  :size="searchSize"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                </el-input>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>     
+            </el-row>
+          </div>
+       </template>
+        <template #operation="{ scope }">
+            <el-tooltip effect="dark" content="修改" placement="top">
+                <i class="el-icon-edit tb-icon"></i>
+            </el-tooltip>
+
+            <el-tooltip effect="dark" content="下载" placement="top">
+                <i class="el-icon-download tb-icon"></i>
+            </el-tooltip>
+        </template>
+        
+      </ex-table>
+    </div>
+
+  
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import asyncRequest from "@/apis/service/reportQuery/purchaseReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table15} from "./columns";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "purchaseOrder",
+  mixins: [mixinPage, resToken],
+  components: {
+    periodDatePickerActive
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    
+  },
+  data() {
+    return {
+      //选中数组
+      changeList: [],
+      //全局url
+      fileUrl: urlConfig.baseURL,
+      //loading
+      loading: false,
+      //请求参数集合
+      parmValue: {
+          select:"",
+        xiugai1:"", //咨询订单号
+        xiugai2:"",
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+       
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格表头 - 列参数
+      table15: table15,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    //初始化http请求
+    async searchList() {
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      return;
+      this.loading = true;
+      
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+   
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+    
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      await this.searchList();
+    },
+
+     //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+     //导出文件 
+    async download() {
+      // if(this.changeList.length<=0){
+      //   this.$message.warning("请选择有效数据")
+      //   return;
+      // }
+      let start_date = new Date(this.parmValue.start_date).valueOf();
+      let end_date = new Date(this.parmValue.end_date).valueOf();
+      let flag = end_date - start_date > 30 * 24 * 60 * 60 * 1000;
+      if(this.parmValue.start_date != "" && this.parmValue.end_date != ""){
+        if(flag){
+          this.$message.warning("导出文件的时间区间不能超过30天")
+          return;
+        }
+      }else{
+        this.$message.warning("请选择导出文件的时间区间")
+        return;
+      }
+      let model = JSON.parse(JSON.stringify(this.parmValue))
+      // model.is_export = 1;
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/reportreturnexport",
+          responseType: "blob",
+          data: model,
+          headers: {
+            // 'Content-Type': 'multipart/form-data',
+            // Accept: "application/vnd.ms-excel"
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            // console.log(res)
+            // console.log(this.fileUrl)
+            // return;
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
+                  type: httpType
+                })
+              );
+              let link = document.createElement("a");
+              link.style.display = "none";
+              link.href = url;
+              let excelName = "退货台账-业务口径.zip";
+              link.setAttribute("download", excelName);
+              document.body.appendChild(link);
+              link.click();
+              link.remove();
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error(res.data.message);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            console.log(error);
+            this.loading = false;
+          });
+      }
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+</style>
+   

+ 3 - 0
src/views/reportQuery/purchaseReport/index.vue

@@ -20,6 +20,7 @@
             <el-tab-pane label="产品下线报表" name="table12"><table12 v-if="activeName == 'table12'"></table12></el-tab-pane>
             <el-tab-pane label="产品修改报表" name="table13"><table13 v-if="activeName == 'table13'"></table13></el-tab-pane>
             <el-tab-pane label="出入库明细报表" name="table14"><table14 v-if="activeName == 'table14'"></table14></el-tab-pane>
+            <el-tab-pane label="退货台账-业务口径" name="table15"><table15 v-if="activeName == 'table15'"></table15></el-tab-pane>
 
           
         </el-tabs>
@@ -50,6 +51,7 @@ const table11 = ()=>import(/* webpackChunkName:'mycomp' */ "./components/table11
 const table12 = ()=>import(/* webpackChunkName:'mycomp' */ "./components/table12")
 const table13 = ()=>import(/* webpackChunkName:'mycomp' */ "./components/table13")
 const table14 = ()=>import(/* webpackChunkName:'mycomp' */ "./components/table14")
+const table15 = ()=>import(/* webpackChunkName:'mycomp' */ "./components/table15")
 export default {
 mixins: [mixinPage, resToken],
 components:{
@@ -67,6 +69,7 @@ components:{
     table12,
     table13,
     table14,
+    table15,
 },
 
   computed: {

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff