Răsfoiți Sursa

商品管理

yusheng 11 luni în urmă
părinte
comite
c6a7a09fdc

+ 21 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -80,7 +80,7 @@
   import fileMain from '@/components/addDoc/index.vue';
   import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
   const dayjs = require('dayjs');
-  import { lbjtList } from '@/enum/dict.js';
+  import { lbjtList,levelList } from '@/enum/dict.js';
   import timeDialog from '@/components/timeDialog/index.vue';
 
   export default {
@@ -302,6 +302,15 @@
                 : '';
             }
           },
+          {
+            width: 160,
+            prop: 'goodsPriceType',
+            label: '价格类型',
+            formatter: (row, column) => {
+              return this.getDictValue('商品价格类型', row.goodsPriceType);
+            },
+            align: 'center'
+          },
           {
             width: 200,
             prop: 'singlePrice',
@@ -356,6 +365,15 @@
                 : '';
             }
           },
+          {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find(item=>item.value==_row.goodsLevel)?.label
+            },
+            align: 'center'
+          },
           {
             width: 110,
             prop: 'batchNo',
@@ -550,6 +568,8 @@
       this.requestDict('生产类型');
       this.requestDict('产地');
       this.requestDict('保质期单位');
+      this.requestDict('商品价格类型');
+
     },
     methods: {
       async getSupplierObj(productList, queryName) {

+ 12 - 0
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrder.vue

@@ -340,6 +340,8 @@ import dictEnum from '@/enum/dict';
 import fileMain from '@/components/addDoc/index.vue';
 import parentList from '@/views/bpm/handleTask/components/supplierManage/parentList.vue';
 import dictMixins from '@/mixins/dictMixins';
+import { levelList } from '@/enum/dict.js';
+
 export default {
   mixins: [dictMixins],
   name: 'customerReturnOrder',
@@ -546,6 +548,16 @@ export default {
               : '';
           }
         },
+        {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find((item) => item.value == _row.goodsLevel)
+                ?.label;
+            },
+            align: 'center'
+          },
         {
           minWidth: 140,
           prop: 'reason',

+ 67 - 58
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -195,6 +195,7 @@
   import { lbjtList } from '@/enum/dict.js';
   import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { levelList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins, tabMixins],
@@ -332,7 +333,15 @@
             },
             showOverflowTooltip: true
           },
-
+          {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find(item=>item.value==_row.goodsLevel)?.label
+            },
+            align: 'center'
+          },
           {
             width: 120,
             prop: 'customerMark',
@@ -434,63 +443,63 @@
             slot: 'weightUnit',
             align: 'center'
           },
-          {
-            width: 160,
-            prop: 'pricingWay',
-            label: '计价方式',
-            slot: 'pricingWay',
-            align: 'center',
-            formatter: (row, column) => {
-              return row.pricingWay == 1
-                ? '按数量计费'
-                : row.pricingWay == 2
-                ? '按重量计费'
-                : '';
-            }
-          },
-          {
-            width: 160,
-            prop: 'singlePrice',
-            label: '单价',
-            slot: 'singlePrice',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'taxRate',
-            label: '税率',
-            formatter: (_row, _column, cellValue) => {
-              return _row.taxRate ? _row.taxRate + '%' : '';
-            },
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'notaxSinglePrice',
-            label: '不含税单价',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'discountSinglePrice',
-            label: '折后单价',
-            slot: 'discountSinglePrice',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'totalPrice',
-            label: '合计',
-            slot: 'totalPrice',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'discountTotalPrice',
-            label: '折后合计',
-            slot: 'discountTotalPrice',
-            align: 'center'
-          },
+          // {
+          //   width: 160,
+          //   prop: 'pricingWay',
+          //   label: '计价方式',
+          //   slot: 'pricingWay',
+          //   align: 'center',
+          //   formatter: (row, column) => {
+          //     return row.pricingWay == 1
+          //       ? '按数量计费'
+          //       : row.pricingWay == 2
+          //       ? '按重量计费'
+          //       : '';
+          //   }
+          // },
+          // {
+          //   width: 160,
+          //   prop: 'singlePrice',
+          //   label: '单价',
+          //   slot: 'singlePrice',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 160,
+          //   prop: 'taxRate',
+          //   label: '税率',
+          //   formatter: (_row, _column, cellValue) => {
+          //     return _row.taxRate ? _row.taxRate + '%' : '';
+          //   },
+          //   align: 'center'
+          // },
+          // {
+          //   width: 160,
+          //   prop: 'notaxSinglePrice',
+          //   label: '不含税单价',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 160,
+          //   prop: 'discountSinglePrice',
+          //   label: '折后单价',
+          //   slot: 'discountSinglePrice',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 120,
+          //   prop: 'totalPrice',
+          //   label: '合计',
+          //   slot: 'totalPrice',
+          //   align: 'center'
+          // },
+          // {
+          //   width: 120,
+          //   prop: 'discountTotalPrice',
+          //   label: '折后合计',
+          //   slot: 'discountTotalPrice',
+          //   align: 'center'
+          // },
           {
             width: 120,
             prop: 'deliveryDays',

+ 30 - 0
src/views/bpm/handleTask/components/saleOrder/invoiceConfirm/detailDialog.vue

@@ -200,6 +200,7 @@
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   import fileMain from '@/components/addDoc/index.vue';
   import { getSendSaleOrderConfirmDetail } from '@/api/bpm/components/saleManage/invoiceConfirm';
+  import { levelList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -436,6 +437,15 @@
                 : '';
             }
           },
+          {
+            width: 160,
+            prop: 'goodsPriceType',
+            label: '价格类型',
+            formatter: (row, column) => {
+              return this.getDictValue('商品价格类型', row.goodsPriceType);
+            },
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'singlePrice',
@@ -449,6 +459,15 @@
             label: '不含税单价',
             align: 'center'
           },
+          {
+            width: 140,
+            prop: 'taxRate',
+            label: '税率',
+            formatter: (row, column) => {
+              return row.taxRate?row.taxRate+'%':''
+            },
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'totalPrice',
@@ -485,6 +504,15 @@
                 : '';
             }
           },
+          {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find(item=>item.value==_row.goodsLevel)?.label
+            },
+            align: 'center'
+          },
           {
             width: 220,
             prop: 'remark',
@@ -516,6 +544,8 @@
     async created() {
       await this.getDetailData(this.businessId);
       this.requestDict('产地');
+      this.requestDict('商品价格类型');
+
       if (this.taskDefinitionKey == 'storemanApprove') {
         this.tabOptions.push({ key: 'outBound', name: '出库单' });
         this.activeComp = 'outBound';

+ 437 - 336
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -19,58 +19,115 @@
         <headerTitle title="退货信息"></headerTitle>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="客户名称:" prop="contactName" style="margin-bottom: 16px">
+            <el-form-item
+              label="客户名称:"
+              prop="contactName"
+              style="margin-bottom: 16px"
+            >
               {{ form.contactName }}
             </el-form-item>
-            <el-form-item label="赔偿金额:" prop="redressAmount" style="margin-bottom: 16px"
-              v-show="['30', '50'].includes(form.type)">
+            <el-form-item
+              label="赔偿金额:"
+              prop="redressAmount"
+              style="margin-bottom: 16px"
+              v-show="['30', '50'].includes(form.type)"
+            >
               {{ form.redressAmount }}元
             </el-form-item>
-            <el-form-item label="赔偿总金额:" prop="totalAmount" style="margin-bottom: 16px">
+            <el-form-item
+              label="赔偿总金额:"
+              prop="totalAmount"
+              style="margin-bottom: 16px"
+            >
               {{ form.totalAmount }}元
             </el-form-item>
             <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
             </el-form-item> -->
-            <el-form-item label="备注:" prop="remark" style="margin-bottom: 16px">
+            <el-form-item
+              label="备注:"
+              prop="remark"
+              style="margin-bottom: 16px"
+            >
               {{ form.remark }}
             </el-form-item>
-            <el-form-item label="创建时间:" prop="createTime" style="margin-bottom: 16px">
+            <el-form-item
+              label="创建时间:"
+              prop="createTime"
+              style="margin-bottom: 16px"
+            >
               {{ form.createTime }}
             </el-form-item>
-            <el-form-item label="制单人:" prop="makerName" style="margin-bottom: 16px">
+            <el-form-item
+              label="制单人:"
+              prop="makerName"
+              style="margin-bottom: 16px"
+            >
               {{ form.makerName }}
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="退货编码:" prop="returnNo" style="margin-bottom: 16px">
+            <el-form-item
+              label="退货编码:"
+              prop="returnNo"
+              style="margin-bottom: 16px"
+            >
               {{ form.returnNo }}
             </el-form-item>
-            <el-form-item label="发货编码:" prop="sendNo" style="margin-bottom: 16px">
+            <el-form-item
+              label="发货编码:"
+              prop="sendNo"
+              style="margin-bottom: 16px"
+            >
               {{ form.sendNo }}
             </el-form-item>
             <el-form-item prop="orderNo" label="订单编码:">
               {{ form.orderNo }}
             </el-form-item>
 
-            <el-form-item label="退货附件:" prop="returnFiles" style="margin-bottom: 16px">
-              <div v-if="detailData.returnFiles && detailData.returnFiles?.length">
-                <el-link v-for="link in detailData.returnFiles" :key="link.id" type="primary" :underline="false"
-                  @click="downloadFile(link)">
+            <el-form-item
+              label="退货附件:"
+              prop="returnFiles"
+              style="margin-bottom: 16px"
+            >
+              <div
+                v-if="detailData.returnFiles && detailData.returnFiles?.length"
+              >
+                <el-link
+                  v-for="link in detailData.returnFiles"
+                  :key="link.id"
+                  type="primary"
+                  :underline="false"
+                  @click="downloadFile(link)"
+                >
                   {{ link.name }}
                 </el-link>
               </div>
             </el-form-item>
-            <el-form-item label="回执附件:" prop="repliedFiles" style="margin-bottom: 16px">
-              <fileMain v-model="form.repliedFiles" :type="taskDefinitionKey == 'salesmanUploadReceipt' ? '' : 'view'
-                "></fileMain>
+            <el-form-item
+              label="回执附件:"
+              prop="repliedFiles"
+              style="margin-bottom: 16px"
+            >
+              <fileMain
+                v-model="form.repliedFiles"
+                :type="
+                  taskDefinitionKey == 'salesmanUploadReceipt' ? '' : 'view'
+                "
+              ></fileMain>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <headerTitle title="退货物品明细"></headerTitle>
-      <ele-pro-table ref="table" :needPage="false" :columns="columns" :toolkit="[]"
-        :datasource="detailData.productList" row-key="id">
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="columns"
+        :toolkit="[]"
+        :datasource="detailData.productList"
+        row-key="id"
+      >
       </ele-pro-table>
     </div>
     <!-- <keep-alive>
@@ -88,77 +145,90 @@
       v-if="activeComp == 'inoutBoundView'"
     ></detailDialog> -->
     <keep-alive>
-      <add ref="add" v-if="activeComp == 'inoutBound'" :form="form" :sourceBizNo="form.returnNo"
-        :detailList="form.productList.filter(item=>item.packageId)" :saleProductList="form.productList.filter(item=>!item.packageId)" :bizType="6" :isMoreProduct="true"></add>
+      <add
+        ref="add"
+        v-if="activeComp == 'inoutBound'"
+        :form="form"
+        :sourceBizNo="form.returnNo"
+        :detailList="form.productList.filter((item) => item.packageId)"
+        :saleProductList="form.productList.filter((item) => !item.packageId)"
+        :bizType="6"
+        :isMoreProduct="true"
+      ></add>
     </keep-alive>
-    <detailDialog v-if="activeComp == 'inoutBoundView'" :businessId="form.receiveNo" ref="detailDialog"></detailDialog>
+    <detailDialog
+      v-if="activeComp == 'inoutBoundView'"
+      :businessId="form.receiveNo"
+      ref="detailDialog"
+    ></detailDialog>
   </div>
 </template>
 
 <script>
-import { getReturnSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
-import { getFile } from '@/api/system/file';
-import dictMixins from '@/mixins/dictMixins';
-import { reviewStatusEnum } from '@/enum/dict';
-import inventoryTabledetail from './inventoryTabledetail.vue';
-import inventoryTable from './inventoryTable.vue';
-// import add from './salesReturnReceipt.vue';
-// import detailDialog from '@/views/bpm/handleTask/components/inoutBound/detailDialog.vue';
-import add from '@/views/bpm/stockManagement/storage.vue';
-import detailDialog from '@/views/bpm/stockManagement/details.vue';
-import fileUpload from '@/components/upload/fileUpload.vue';
-import fileMain from '@/components/addDoc/index.vue';
+  import { getReturnSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
+  import { getFile } from '@/api/system/file';
+  import dictMixins from '@/mixins/dictMixins';
+  import { reviewStatusEnum } from '@/enum/dict';
+  import inventoryTabledetail from './inventoryTabledetail.vue';
+  import inventoryTable from './inventoryTable.vue';
+  // import add from './salesReturnReceipt.vue';
+  // import detailDialog from '@/views/bpm/handleTask/components/inoutBound/detailDialog.vue';
+  import add from '@/views/bpm/stockManagement/storage.vue';
+  import detailDialog from '@/views/bpm/stockManagement/details.vue';
+  import fileUpload from '@/components/upload/fileUpload.vue';
+  import fileMain from '@/components/addDoc/index.vue';
+  import { levelList } from '@/enum/dict.js';
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    fileMain,
-    fileUpload,
-    detailDialog,
-    add,
-    inventoryTabledetail,
-    inventoryTable
-  },
-  data() {
-    return {
-      codeData: [],
-      tabOptions: [{ key: 'main', name: '退货单详情' }],
-      reviewStatusEnum,
-      activeComp: 'main',
-      visible: false,
-      detailId: '',
-      title: '详情',
-      row: {},
-      activeName: 'base',
-      qualityStatus: {
-        0: '未质检',
-        1: '已质检'
-      }, // 质检状态 0未检 1已检
-      qualityResults: {
-        1: '合格',
-        2: '不合格'
-      }, // 质检结果 1合格 2不合格
-      form: {
-        orderFiles: [{ name: '222' }]
-      },
-      rules: {},
-      detailData: {},
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          minWidth: 160,
-          prop: 'productCode',
-          label: '编码',
-          showOverflowTooltip: true,
-          align: 'center'
+  export default {
+    mixins: [dictMixins],
+    components: {
+      fileMain,
+      fileUpload,
+      detailDialog,
+      add,
+      inventoryTabledetail,
+      inventoryTable
+    },
+    data() {
+      return {
+        codeData: [],
+        tabOptions: [{ key: 'main', name: '退货单详情' }],
+        reviewStatusEnum,
+        activeComp: 'main',
+        visible: false,
+        detailId: '',
+        title: '详情',
+        row: {},
+        activeName: 'base',
+        qualityStatus: {
+          0: '未质检',
+          1: '已质检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          1: '合格',
+          2: '不合格'
+        }, // 质检结果 1合格 2不合格
+        form: {
+          orderFiles: [{ name: '222' }]
         },
-        {
+        rules: {},
+        detailData: {},
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 160,
+            prop: 'productCode',
+            label: '编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
             minWidth: 200,
             prop: 'orderNo',
             slot: 'orderNo',
@@ -166,278 +236,309 @@ export default {
             showOverflowTooltip: true,
             align: 'center'
           },
-        {
-          minWidth: 120,
-          prop: 'productName',
-          label: '名称',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-
-        {
-          minWidth: 160,
-          prop: 'batchNo',
-          label: '批次号',
-          showOverflowTooltip: true,
-          slot: 'batchNo',
-          align: 'center'
-        },
-        {
-          minWidth: 160,
-          prop: 'barcodes',
-          label: '发货条码',
-          showOverflowTooltip: true,
-          slot: 'barcodes',
-          align: 'center'
-        },
-        {
-          minWidth: 120,
-          prop: 'materielDesignation',
-          label: '物料代号',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          minWidth: 120,
-          prop: 'clientCode',
-          label: '客户代号',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          minWidth: 120,
-          prop: 'engrave',
-          label: '刻码',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          minWidth: 160,
-          prop: 'packageNo',
-          align: 'center',
-          label: '包装编码',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 100,
-          prop: 'packingQuantity',
-          align: 'center',
-          label: '包装数量',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 120,
-          prop: 'packingUnit',
-          align: 'center',
-          label: '包装单位',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 100,
-          prop: 'totalCount',
-          label: '计量数量',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          minWidth: 150,
-          prop: 'measuringUnit',
-          label: '计量单位',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          width: 160,
-          prop: 'pricingWay',
-          label: '计价方式',
-          slot: 'pricingWay',
-          align: 'center',
-          formatter: (row, column) => {
-            return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费' : '';
+          {
+            minWidth: 120,
+            prop: 'productName',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
 
-          }
-        },
-        {
-          width: 100,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice',
-          align: 'center'
-        },
-        {
-            width: 150,
+          {
+            minWidth: 160,
+            prop: 'batchNo',
+            label: '批次号',
+            showOverflowTooltip: true,
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
+            slot: 'barcodes',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'packageNo',
+            align: 'center',
+            label: '包装编码',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'packingQuantity',
+            align: 'center',
+            label: '包装数量',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'packingUnit',
+            align: 'center',
+            label: '包装单位',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'totalCount',
+            label: '计量数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
+            }
+          },
+          {
+            width: 160,
+            prop: 'goodsPriceType',
+            label: '价格类型',
+            formatter: (row, column) => {
+              return this.getDictValue('商品价格类型', row.goodsPriceType);
+            },
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'taxRate',
+            label: '税率',
+            formatter: (row, column) => {
+              return row.taxRate ? row.taxRate + '%' : '';
+            },
+            align: 'center'
+          },
+          {
+            width: 180,
             prop: 'notaxSinglePrice',
             label: '不含税单价',
+            // slot: 'notaxSinglePrice',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
+            align: 'center'
+          },
+          // {
+          //   minWidth: 80,
+          //   prop: 'weight',
+          //   label: '重量',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
+          {
+            minWidth: 80,
+            prop: 'receiveTotalWeight',
+            label: '重量',
+            // slot: 'singleWeight',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'provenance',
+            label: '产地',
+            slot: 'provenance',
+            align: 'center',
+            minWidth: 200,
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.provenance && row.provenance.length
+                ? row.provenance
+                    .map((item) => this.getDictValue('产地', item))
+                    .join(',')
+                : '';
+            }
+          },
+          {
+            minWidth: 120,
+            prop: 'goodsLevel',
+            label: '物品级别',
+            formatter: (_row, _column, cellValue) => {
+              return levelList.find((item) => item.value == _row.goodsLevel)
+                ?.label;
+            },
+            align: 'center'
+          },
+          {
+            minWidth: 200,
+            prop: 'returnReason',
+            label: '退货原因',
+            slot: 'returnReason',
             align: 'center'
           },
 
-        {
-          width: 120,
-          prop: 'totalPrice',
-          label: '合计',
-          slot: 'totalPrice',
-          align: 'center'
-        },
-        // {
-        //   minWidth: 80,
-        //   prop: 'weight',
-        //   label: '重量',
-        //   showOverflowTooltip: true,
-        //   align: 'center'
-        // },
-        {
-          minWidth: 80,
-          prop: 'receiveTotalWeight',
-          label: '重量',
-          // slot: 'singleWeight',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          minWidth: 100,
-          prop: 'weightUnit',
-          label: '重量单位',
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          prop: 'provenance',
-          label: '产地',
-          slot: 'provenance',
-          align: 'center',
-          minWidth: 200,
-          showOverflowTooltip: true,
-          formatter: (row, column) => {
-            return row.provenance && row.provenance.length
-              ? row.provenance
-                .map((item) => this.getDictValue('产地', item))
-                .join(',')
-              : '';
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
           }
-        },
-
-        {
-          minWidth: 200,
-          prop: 'returnReason',
-          label: '退货原因',
-          slot: 'returnReason',
-          align: 'center'
-        },
-
-        {
-          width: 220,
-          prop: 'remark',
-          label: '备注',
-          slot: 'remark',
-          align: 'center'
-        }
-      ]
-    };
-  },
-  props: {
-    businessId: {
-      default: ''
-    },
-    taskDefinitionKey: {
-      default: ''
-    }
-  },
-  created() {
-    this.requestDict('产地');
-    this.getDetailData(this.businessId);
-    if (this.taskDefinitionKey == 'storemanApprove') {
-      this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
-    }
-    if (this.taskDefinitionKey == 'salesmanUploadReceipt') {
-      this.tabOptions.push({ key: 'inoutBoundView', name: '入库单详情' });
-      // this.activeComp = 'inoutBoundView';
-    }
-    console.log('this.tabOptions----------------', this.tabOptions);
-  },
-  methods: {
-    changeActive(item) {
-      this.activeComp = item.key;
-      this.$emit('activeCompChange', item.key);
-      // if (
-      //   this.taskDefinitionKey == 'storemanApprove' &&
-      //   item.key == 'inoutBound'
-      // ) {
-      //   this.$nextTick(() => {
-      //     this.$refs.add.pickerSuccess(this.form);
-      //   });
-      // }
-    },
-    downloadFile(file) {
-      getFile({ objectName: file.storePath }, file.name);
+        ]
+      };
     },
-    async getTableValue() {
-      try {
-        await this.getValidate();
-        // 表单验证通过,执行保存操作
-        this.loading = true;
-        this.form.repliedFiles = this.form.repliedFiles || [];
-        this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
-        this.form.returnStorageData = await this.$refs.add.getReturnStorage();
-        return Object.assign({}, this.form);
-      } catch (error) {
-        console.log(error);
-        return '';
-        // 表单验证未通过,不执行保存操作
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
       }
     },
-    save(data) {
-      this.$refs.add.handleNewSave(data);
-    },
-    success() {
-      this.$emit('handleClose');
-    },
-    getValidate() {
-      return Promise.all([
-        new Promise((resolve, reject) => {
-          resolve(true);
-        })
-      ]);
+    created() {
+      this.requestDict('产地');
+      this.requestDict('商品价格类型');
+
+      this.getDetailData(this.businessId);
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
+      }
+      if (this.taskDefinitionKey == 'salesmanUploadReceipt') {
+        this.tabOptions.push({ key: 'inoutBoundView', name: '入库单详情' });
+        // this.activeComp = 'inoutBoundView';
+      }
+      console.log('this.tabOptions----------------', this.tabOptions);
     },
-    async getDetailData(id) {
-      this.loading = true;
-      const data = await getReturnSaleOrderrecordDetail(id);
-      this.loading = false;
-      if (data) {
-        this.detailData = data;
-        this.form = data;
-        this.form.productList.forEach(item => {
-          item['packingWeight'] = item.receiveTotalWeight
-          item['quantity'] = item.totalCount
-        })
-        this.form.pricingWay = data.saleOrder.pricingWay;
-        this.$nextTick(() => {
-          if (this.taskDefinitionKey == 'storemanApprove') {
-            this.activeComp = 'inoutBound';
-            this.$emit('activeCompChange', 'inoutBound');
-          }
-        });
+    methods: {
+      changeActive(item) {
+        this.activeComp = item.key;
+        this.$emit('activeCompChange', item.key);
+        // if (
+        //   this.taskDefinitionKey == 'storemanApprove' &&
+        //   item.key == 'inoutBound'
+        // ) {
+        //   this.$nextTick(() => {
+        //     this.$refs.add.pickerSuccess(this.form);
+        //   });
+        // }
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      async getTableValue() {
+        try {
+          await this.getValidate();
+          // 表单验证通过,执行保存操作
+          this.loading = true;
+          this.form.repliedFiles = this.form.repliedFiles || [];
+          this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
+          this.form.returnStorageData = await this.$refs.add.getReturnStorage();
+          return Object.assign({}, this.form);
+        } catch (error) {
+          console.log(error);
+          return '';
+          // 表单验证未通过,不执行保存操作
+        }
+      },
+      save(data) {
+        this.$refs.add.handleNewSave(data);
+      },
+      success() {
+        this.$emit('handleClose');
+      },
+      getValidate() {
+        return Promise.all([
+          new Promise((resolve, reject) => {
+            resolve(true);
+          })
+        ]);
+      },
+      async getDetailData(id) {
+        this.loading = true;
+        const data = await getReturnSaleOrderrecordDetail(id);
+        this.loading = false;
+        if (data) {
+          this.detailData = data;
+          this.form = data;
+          this.form.productList.forEach((item) => {
+            item['packingWeight'] = item.receiveTotalWeight;
+            item['quantity'] = item.totalCount;
+          });
+          this.$nextTick(() => {
+            if (this.taskDefinitionKey == 'storemanApprove') {
+              this.activeComp = 'inoutBound';
+              this.$emit('activeCompChange', 'inoutBound');
+            }
+          });
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="scss">
-.ele-dialog-form {
-  .el-form-item {
-    margin-bottom: 10px;
+  .ele-dialog-form {
+    .el-form-item {
+      margin-bottom: 10px;
+    }
   }
-}
 
-.headbox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
 
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    margin-right: 20px;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
   }
-}
 </style>