Prechádzať zdrojové kódy

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt into test

chencc 1 rok pred
rodič
commit
396fa70354
22 zmenil súbory, kde vykonal 649 pridanie a 126 odobranie
  1. 2 1
      src/BIZComponents/inventoryTableDetails.vue
  2. 33 0
      src/api/bpm/components/saleManage/exceptionManagement.js
  3. 9 3
      src/enum/dict.js
  4. 4 3
      src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue
  5. 15 14
      src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue
  6. 2 1
      src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue
  7. 2 1
      src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue
  8. 2 1
      src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue
  9. 2 1
      src/views/bpm/handleTask/components/purchaseOrder/returnGoods/inventoryTable.vue
  10. 2 1
      src/views/bpm/handleTask/components/saleOrder/entrustedReceive/detailDialog.vue
  11. 298 0
      src/views/bpm/handleTask/components/saleOrder/exceptionManagement/addOrEditDialog.vue
  12. 147 0
      src/views/bpm/handleTask/components/saleOrder/exceptionManagement/submit.vue
  13. 2 1
      src/views/bpm/handleTask/components/saleOrder/invoice/addInvoiceDialog.vue
  14. 2 1
      src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue
  15. 2 1
      src/views/bpm/handleTask/components/saleOrder/invoice/inventoryTable.vue
  16. 17 4
      src/views/bpm/handleTask/components/saleOrder/invoiceConfirm/detailDialog.vue
  17. 2 1
      src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue
  18. 2 1
      src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue
  19. 2 2
      src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/addReturnGoodsDialog.vue
  20. 8 25
      src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue
  21. 3 28
      src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue
  22. 91 36
      src/views/bpm/stockManagement/storage.vue

+ 2 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -208,7 +208,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 33 - 0
src/api/bpm/components/saleManage/exceptionManagement.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request';
+
+/**
+ * 列表
+ */
+ export async function getList (params) {
+    const res = await request.get('/eom/exceptionmanagement/page', {params});
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }
+/**
+ * 详情
+ */
+export async function getById (id) {
+  const res = await request.get('/eom/exceptionmanagement/getById/'+id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 跟新
+ */
+  // 编辑
+  export async function update (data) {
+    const res = await request.put(`/eom/exceptionmanagement/update`, data);
+    if (res.data.code == 0) {
+      return res.data.message;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }

+ 9 - 3
src/enum/dict.js

@@ -135,6 +135,12 @@ export const proStatusEnum = [
 ];
 // 计价方式
 export const pricingWayList= [
-  { id: 1, name: '按数量计价' },
-  { id: 2, name: '按重量计价' }
-]
+  { id: 1, name: '按数量计费' },
+  { id: 2, name: '按重量计费' }
+
+]
+//来源类型
+export const relationType= {
+  1: '收货确认单',
+
+}

+ 4 - 3
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -105,9 +105,9 @@
           >
             {{ form.totalAmount }}元
           </el-form-item>
-          <el-form-item label="计价方式:" style="margin-bottom: 16px">
+          <!-- <el-form-item label="计价方式:" style="margin-bottom: 16px">
             {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-          </el-form-item>
+          </el-form-item> -->
         </el-col>
       </el-row>
       <headerTitle title="基本信息"></headerTitle>
@@ -472,7 +472,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 15 - 14
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -64,12 +64,10 @@
               style="margin-bottom: 16px"
             >
               <fileMain v-model="form.receiveFiles" type="view"></fileMain>
-             
             </el-form-item>
           </el-col>
 
           <el-col :span="12">
-          
             <el-form-item
               label="收货单编码:"
               prop="receiveNo"
@@ -117,10 +115,8 @@
         :datasource="detailData.productList"
         row-key="id"
       >
-
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.receiveFiles" type="view"></fileMain>
-          
         </template>
       </ele-pro-table>
     </div>
@@ -278,6 +274,13 @@
             slot: 'modelType',
             align: 'center'
           },
+          {
+            width: 120,
+            prop: 'supplierMark',
+            label: '供应商代号',
+            slot: 'supplierMark',
+            align: 'center'
+          },
           {
             width: 120,
             prop: 'specification',
@@ -356,7 +359,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -371,7 +378,7 @@
             prop: 'taxRate',
             label: '税率',
             slot: 'taxRate',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 160,
@@ -460,8 +467,6 @@
       storageApi
         .getInfoBySourceBizNo(this.form.receiveNo)
         .then((res) => {
-          console.log('-----------!_-------!_');
-          console.log(res);
           if (JSON.stringify(res) == '{}') {
             // 未查询到相关信息(未入库)
             if (this.taskDefinitionKey == 'storeManagerApprove') {
@@ -524,7 +529,6 @@
 
     methods: {
       changeActive(item) {
-        console.log(item, '切换!!!!!!!!!!!!!!!!!!!!');
         this.activeComp = item.key;
         this.$emit('activeCompChange', item.key);
         // if (
@@ -540,7 +544,6 @@
         this.$refs.add.handleSave(data);
       },
       success() {
-        // console.log(this.$parent,'this.$parent')
         // this.$parent.handleClose()
 
         this.$emit('handleClose');
@@ -581,12 +584,10 @@
         const data = await getReceiveSaleOrderrecordDetail(id);
         this.loading = false;
         if (data) {
+          console.log(data, '1111111111111111111111');
+
           this.form = data;
           this.detailData = data;
-          console.log(
-            this.detailData,
-            'this.detailDatathis.detailDatathis.detailDatathis.detailData'
-          );
         }
       }
     }

+ 2 - 1
src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue

@@ -333,7 +333,8 @@ export default {
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
         {

+ 2 - 1
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue

@@ -269,7 +269,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 1
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue

@@ -346,7 +346,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 1
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/inventoryTable.vue

@@ -401,7 +401,8 @@ export default {
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
         {

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/entrustedReceive/detailDialog.vue

@@ -268,7 +268,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 298 - 0
src/views/bpm/handleTask/components/saleOrder/exceptionManagement/addOrEditDialog.vue

@@ -0,0 +1,298 @@
+<template>
+  <div>
+    <el-form ref="form" :model="form" label-width="120px" class="el-form-box">
+      <headerTitle title="基本信息"></headerTitle>
+
+      <el-row :gutter="12">
+        <el-col :span="8">
+          <el-form-item label="编码" prop="code">
+            <el-input
+              v-model="form.code"
+              placeholder="请输入"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="名称" prop="name">
+            <el-input clearable v-model="form.name" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源类型" prop="relationType">
+            <el-input
+              clearable
+              v-model="form.relationTypeName"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源编码" prop="relationCode">
+            <el-input clearable v-model="form.relationCode" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源名称" prop="relationName">
+            <el-input clearable v-model="form.relationName" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="创建人" prop="createUserName">
+            <el-input
+              clearable
+              v-model="form.createUserName"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="创建时间" prop="createTime">
+            <el-input clearable v-model="form.createTime" :disabled="true" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :toolkit="[]"
+      :datasource="form.detailList"
+      row-key="id"
+    >
+      <template v-slot:headerExceptionDispose="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+      <template v-slot:exceptionDispose="scope">
+        <el-select v-model="scope.row.exceptionDispose" placeholder="请选择">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import {
+    getById,
+    update
+  } from '@/api/bpm/components/saleManage/exceptionManagement.js';
+  import { relationType } from '@/enum/dict.js';
+
+  export default {
+    mixins: [dictMixins],
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskDefinitionKey: {}
+    },
+    data() {
+      return {
+        options: [
+          { label: '退货入库', value: 1 },
+          { label: '返工返修', value: 2 },
+          { label: '报损', value: 3 },
+          { label: '报废', value: 4 }
+        ],
+        form: {},
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 220,
+            prop: 'exceptionDispose',
+            label: '处置方式',
+            slot: 'exceptionDispose',
+            fixed: 'left',
+            align: 'center',
+            headerSlot: 'headerExceptionDispose'
+          },
+          {
+            minWidth: 160,
+            prop: 'productCode',
+            label: '编码',
+            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
+                ? '按重量计费'
+                : '';
+            }
+          },
+          {
+            width: 100,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+
+          {
+            width: 100,
+            prop: 'totalPrice',
+            label: '合计',
+            align: 'center'
+          },
+
+          {
+            minWidth: 80,
+            prop: 'receiveTotalWeight',
+            label: '重量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            width: 220,
+            prop: 'describes',
+            label: '描述',
+            slot: 'describes',
+            align: 'center'
+          }
+        ]
+      };
+    },
+    created() {
+      this.getById(this.businessId);
+    },
+    methods: {
+      //获取订单详情
+      async getById(id) {
+        this.loading = true;
+        let data = await getById(id);
+        data['relationTypeName'] = relationType[data.relationType];
+
+        if (data) {
+          this.form = data;
+        }
+      },
+      async getTableValue() {
+        let is = false;
+        this.form.detailList.forEach((item) => {
+          if (!item.exceptionDispose) {
+            is = true;
+          }
+        });
+        if (is) {
+          this.$message.error('处置方式不能为空');
+          return;
+        }
+        return this.form;
+      }
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 147 - 0
src/views/bpm/handleTask/components/saleOrder/exceptionManagement/submit.vue

@@ -0,0 +1,147 @@
+<template>
+  <el-col :span="16" :offset="6">
+    <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        label="审批建议"
+        prop="reason"
+        style="margin-bottom: 20px"
+        :rules="{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }"
+      >
+        <el-input
+          type="textarea"
+          v-model="form.reason"
+          placeholder="请输入审批建议"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="handleAudit(1)"
+        >通过
+      </el-button>
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="handleAudit(0)"
+        >驳回
+      </el-button>
+    </div>
+  </el-col>
+</template>
+
+<script>
+  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
+  import {
+    update
+  } from '@/api/bpm/components/saleManage/exceptionManagement.js';
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+    components: {
+      //   Parser
+    },
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        isSaveLoading: false,
+        form: {
+          technicianId: '',
+          reason: ''
+        }
+      };
+    },
+    async created() {},
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
+
+      async handleAudit(status) {
+        const data = await this.getTableValue();
+        if (!data && !!status) {
+          return;
+        }
+        await update(data)
+        await this._approveTaskWithVariables(status);
+      },
+      async _approveTaskWithVariables(status) {
+        let variables = {
+          pass: !!status
+        };
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.data.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: status === 0 ? '驳回' : ''
+            });
+          }
+        });
+      },
+      getTableValue() {
+        return new Promise((resolve, reject) => {
+          this.$emit('getTableValue', async (data) => {
+            resolve(await data);
+          });
+        });
+      },
+
+      //更多
+      handleCommand(command) {
+        if (command === 'cancel') {
+          this.$confirm('是否确认作废?', {
+            type: 'warning',
+            cancelButtonText: '取消',
+            confirmButtonText: '确定'
+          })
+            .then(() => {
+              saleSendProcessCancel({
+                id: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss"></style>

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/invoice/addInvoiceDialog.vue

@@ -390,7 +390,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' :  row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -425,7 +425,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' :  row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/invoice/inventoryTable.vue

@@ -450,7 +450,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' :  row.pricingWay == 2 ? '重量':'';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 17 - 4
src/views/bpm/handleTask/components/saleOrder/invoiceConfirm/detailDialog.vue

@@ -88,9 +88,9 @@
 <!--                >-->
 <!--              </div>-->
             </el-form-item>
-            <el-form-item label="计价方式:" style="margin-bottom: 22px">
+            <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
 
           <el-col :span="12">
@@ -396,7 +396,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {
@@ -436,7 +437,19 @@
             slot: 'remark',
             align: 'center'
           },
-         
+          {
+            width: 150,
+            prop: 'isException',
+            label: '收货状态',
+            slot: 'isException',
+            formatter: (row, column) => {
+              return row.isException == 1
+                ? '未收货'
+                : '已收货'
+            },
+            fixed: 'right',
+            align: 'center'
+          }
         ]
       };
     },

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -521,7 +521,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 1
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -332,7 +332,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {

+ 2 - 2
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/addReturnGoodsDialog.vue

@@ -45,7 +45,7 @@
         </el-col>
       </el-row>
       <el-row :gutter="20">
-        <el-col :span="12">
+        <!-- <el-col :span="12">
           <el-form-item
             label="计价方式"
             style="margin-bottom: 22px">
@@ -54,7 +54,7 @@
               <el-option label="按重量计费" :value="2"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="12">
           <el-form-item
             label="客户名称"

+ 8 - 25
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -313,7 +313,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {
@@ -323,31 +324,13 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          
+ 
           {
-            width: 100,
-            prop: 'taxRate',
-            label: '税率',
-            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,
+            width: 120,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
             align: 'center'
           },
           // {

+ 3 - 28
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue

@@ -449,7 +449,8 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '数量' : '重量';
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
             }
           },
           {
@@ -459,33 +460,7 @@
             slot: 'singlePrice',
             align: 'center'
           },
-          {
-            width: 100,
-            prop: 'taxRate',
-            label: '税率',
-            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: 80,
           //   prop: 'weight',

+ 91 - 36
src/views/bpm/stockManagement/storage.vue

@@ -356,6 +356,19 @@
                   </template>
                 </template>
               </el-table-column>
+              <el-table-column
+                label="计价方式"
+                align="center"
+                prop="pricingWay"
+                :show-overflow-tooltip="true"
+                width="120"
+              >
+                <template slot-scope="{ row, $index }">
+                  <span v-if="row.pricingWay == 1">数量</span>
+                  <span v-if="row.pricingWay == 2">重量</span>
+                </template>
+              </el-table-column>
+
               <el-table-column
                 label="总重"
                 align="center"
@@ -468,6 +481,23 @@
                 prop="supplierCode"
                 width="120"
                 :show-overflow-tooltip="true"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template v-if="bizType == 2">{{
+                    row.supplierMark
+                  }}</template>
+                  <template v-if="bizType != 2">{{
+                    row.supplierCode
+                  }}</template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                v-if="bizType == 2"
+                label="产地"
+                align="center"
+                prop="provenance "
+                :show-overflow-tooltip="true"
+                width="120"
               >
               </el-table-column>
               <el-table-column
@@ -654,7 +684,7 @@
             </template>
           </el-table-column>
           <el-table-column label="客户代号" prop="clientCode">
-            <template slot-scope="{ row, $index }">
+            <template slot-scope="{ row, $index }" v-if="bizType != 2">
               <el-input
                 v-if="!row.isPack"
                 :ref="'packing_clientCode' + $index"
@@ -665,6 +695,17 @@
               ></el-input>
               <span v-else> {{ row.clientCode }}</span>
             </template>
+            <template slot-scope="{ row, $index }" v-if="bizType == 2">
+              <el-input
+                v-if="!row.isPack"
+                :ref="'packing_clientCode' + $index"
+                @keyup.native="
+                  moveFocus($event, $index, 'packing_clientCode', '包装', row)
+                "
+                v-model="row.customerMark"
+              ></el-input>
+              <span v-else> {{ row.customerMark }}</span>
+            </template>
           </el-table-column>
           <el-table-column label="刻码" prop="engrave" width="140">
             <template slot-scope="{ row, $index }">
@@ -834,7 +875,7 @@
             </template>
           </el-table-column>
           <el-table-column label="客户代号" prop="clientCode">
-            <template slot-scope="{ row, $index }">
+            <template slot-scope="{ row, $index }" v-if="bizType != 2">
               <el-input
                 v-if="!row.isPack"
                 :ref="'material_clientCode' + $index"
@@ -845,6 +886,17 @@
               ></el-input>
               <span v-else>{{ row.clientCode }}</span>
             </template>
+            <template slot-scope="{ row, $index }" v-if="bizType == 2">
+              <el-input
+                v-if="!row.isPack"
+                :ref="'packing_clientCode' + $index"
+                @keyup.native="
+                  moveFocus($event, $index, 'packing_clientCode', '物料', row)
+                "
+                v-model="row.customerMark"
+              ></el-input>
+              <span v-else> {{ row.customerMark }}</span>
+            </template>
           </el-table-column>
           <el-table-column label="刻码" prop="engrave" width="140">
             <template slot-scope="{ row, $index }">
@@ -1171,7 +1223,6 @@
       },
       // 初始化信息
       async initFormData() {
-        console.log('this.form---------------', this.form);
         this.formData.type = 1;
         this.formData.bizType = this.bizType;
         if (
@@ -1201,12 +1252,14 @@
 
         // this.formData.extInfo.supplierName = this.form.supplierName;
         // this.formData.extInfo.supplierId = this.form.supplierId;
+        console.log('this.saleProductList---------', this.saleProductList);
         if (this.saleProductList?.length > 0) {
-          // 物品列表 this.saleProductList
+          // 物品列表
           let codeList = this.saleProductList.map((item) => {
             return item.productCode;
           });
           storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
+            console.log('res---------', res);
             if (res.length <= 0) {
               this.$message.warning('未获取到物品信息!');
               return;
@@ -1217,7 +1270,6 @@
             const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
               categoryIds: res.map((item) => item.id)
             });
-            // console.log(supplierList[item.id])
             // 获取包装规格
             let packingSpecification =
               await storageApi.getCategoryPackageDisposition({
@@ -1232,6 +1284,7 @@
               let filtersItem = this.saleProductList.filter(
                 (detailItem) => detailItem.productCode == item.code
               )[0];
+
               // 显示规格
               let packingSpecificationLabel = this.packingSpecificationOption[
                 index
@@ -1249,8 +1302,17 @@
               let packingUnit = filtersItem.measuringUnit || '';
 
               let price = filtersItem.singlePrice || 0;
-              let singleWeight = filtersItem.singleWeight || 0; // 单重重量
-              let weight = filtersItem.sendTotalWeight || 0;
+              let pricingWay = filtersItem.pricingWay || '';
+              // 计价方式是重量
+              let singleWeight =
+                this.detailProductList[0]?.pricingWay == 2
+                  ? this.detailProductList[0]?.singleWeight
+                  : filtersItem.singleWeight || 0;
+              let weight =
+                this.detailProductList[0]?.pricingWay == 2
+                  ? this.detailProductList[0]?.singleWeight *
+                    filtersItem.measureQuantity
+                  : filtersItem.sendTotalWeight || 0;
               // 获取相同仓库
               let warehouseIds = [];
               let warehouseNames = [];
@@ -1258,6 +1320,7 @@
                 warehouseIds.push(filtersItem.warehouseId);
                 warehouseNames.push(filtersItem.warehouseName);
               }
+              let totalMoney = filtersItem.totalPrice || 0;
               return {
                 index: this.productList.length + index,
                 categoryId: item.id, // 物品id
@@ -1266,7 +1329,7 @@
                 categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
-                batchNo: this.saleProductList[index]?.batchNo||batchNo, // 批次号
+                batchNo: this.saleProductList[index]?.batchNo || batchNo, // 批次号
                 supplierListOptions: supplierList[item.id], // 供应商列表
                 supplierId: this.form.supplierId, // 供应商id
                 supplierCode: this.form.supplierCode, // 供应商代号
@@ -1285,8 +1348,9 @@
                 singleWeight: singleWeight, // 单重重量
                 weight: weight, // 总重量
                 weightUnit: item.weightUnit, // 重量单位
-                totalMoney: '', // 总价
+                totalMoney: totalMoney, // 总价
                 price: item.price || price, // 单价
+                pricingWay: pricingWay, //计价方式
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
                 warehouseId, // 仓库id
@@ -1425,10 +1489,6 @@
                     break;
                 }
               }
-              console.log(
-                item,
-                'itemmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm'
-              );
               let singleWeight = item.singleWeight || 0; // 单重重量
               return {
                 index: this.productList.length + index,
@@ -1464,7 +1524,7 @@
                 weight: weight, // 重量
                 singleWeight: singleWeight,
                 weightUnit: item.weightUnit, // 重量单位
-                totalMoney: '', // 总价
+                totalMoney: item.totalPrice, // 总价
                 price: item.price, // 单价
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
@@ -1603,7 +1663,7 @@
                       (val) => val.categoryCode == item.productCode
                     ).index
                   : this.productList[0].index, // 产品索引
-                batchNo: item.batchNo||this.productList[0].batchNo, // 批次号
+                batchNo: item.batchNo || this.productList[0].batchNo, // 批次号
                 packageNo: packingCodeList[index]?.onlyCode, // 包装编码
                 packingQuantity: 1, // 包装数量
                 packingUnit: item.packingUnit, // 单位
@@ -1611,6 +1671,7 @@
                 measureUnit: item.measuringUnit, // 计量单位
                 weight: item.packingWeight, // 重量
                 singleWeight: item.singleWeight,
+                pricingWay: item.pricingWay,
                 weightUnit: item.weightUnit || this.productList[0].weightUnit, // 重量单位
                 packingSpecificationOption: this.isMoreProduct
                   ? this.productList.find(
@@ -1779,10 +1840,8 @@
 
         // 向上 =38
         if (event.keyCode === 38) {
-          console.log('向上');
           if (index === 0) {
             // 第一行
-            console.log('第一行无法向上');
             return;
           }
           this.$refs[key + index].blur();
@@ -1796,10 +1855,8 @@
 
         // 下 = 40
         if (event.keyCode === 40) {
-          console.log('向下');
           if (index === listLength - 1) {
             // 最后一行
-            console.log('最后一行无法向下');
             return;
           }
           this.$refs[key + index].blur();
@@ -1843,16 +1900,13 @@
 
         // 右 = 39
         if (event.keyCode === 39) {
-          console.log('向右');
           if (
             index === listLength - 1 &&
             key === keyfield[keyfield.length - 1]
           ) {
             // 最后一行最后一个
-            console.log('最后一行最后一个无法向左');
             return;
           }
-          console.log(this.$refs);
           this.$refs[key + index].blur();
           if (key === keyfield[keyfield.length - 1]) {
             // 当前行最后一个,跳转下一行第一个
@@ -1912,7 +1966,6 @@
               )
             };
           });
-          console.log('_处理后 _packingList', _packingList);
 
           // 处理产品数据
           this.productList = this.productList.map((productItem) => {
@@ -2018,7 +2071,6 @@
         // 修改拆分物料
         this.materialList.map((item, index) => {
           if (item.parentIndex === row.index) {
-            console.log(value / row.measureQuantity);
             this.$set(
               this.materialList[index],
               'weight',
@@ -2121,16 +2173,20 @@
       //计算金额
       calcSumTotal(measureQuantity, price, row) {
         //最小包装单元,包装数量,单价
-        const total = {
-          measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
-          price: Number(price > 0 ? price : 0)
-        };
-        let number = Number(
-          this.$math.format(total.measureQuantity * total.price, 14)
-        );
+        if (this.bizType != 2) {
+          const total = {
+            measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
+            price: Number(price > 0 ? price : 0)
+          };
+          let number = Number(
+            this.$math.format(total.measureQuantity * total.price, 14)
+          );
 
-        row.totalMoney = number;
-        return number;
+          row.totalMoney = number;
+          return number;
+        } else {
+          return row.totalMoney;
+        }
       },
 
       // 包装维度最小包装单元改变——>总重量
@@ -2280,8 +2336,9 @@
             netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
             weight: 0, // 重量
             singleWeight: item.measuringUnit != 'KG' ? item.netWeight : 0, // 单重
+            pricingWay: item.pricingWay,
             weightUnit: item.weightUnit, // 重量单位
-            totalMoney: '', // 总价
+            totalMoney: item.totalPrice, // 总价
             price: item.price, // 单价
             purpose: '', // 用途
             isUnpack: item.isUnpack // 是否允许拆包
@@ -2438,7 +2495,6 @@
       // 物品保存验证表单(单独)
       validateFormIndividually(index) {
         return new Promise(async (resolve) => {
-          console.log(index);
           let fileds = [
             `productList.${index}.batchNo`,
             `productList.${index}.packingQuantity`,
@@ -2492,7 +2548,6 @@
         //     )
         //   );
         // }
-        console.log(row);
         this.deletePackingAndMaterial(row);
       },
       // 根据产品信息删除包装和物料