Przeglądaj źródła

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

wsx 10 miesięcy temu
rodzic
commit
f32670c65b

+ 22 - 11
src/views/saleManage/saleOrder/index.vue

@@ -42,6 +42,7 @@
                   icon="el-icon-plus"
                   class="ele-btn-icon"
                   @click="openEdit('add', {})"
+                  v-if="$hasPermission('eom:saleorder:save')"
                 >
                   新建
                 </el-button>
@@ -51,6 +52,7 @@
                   el-icon-delete
                   class="ele-btn-icon"
                   @click="allDelBtn"
+                  v-if="$hasPermission('eom:saleorder:delete')"
                   :disabled="selection?.length === 0"
                 >
                   批量删除
@@ -61,6 +63,7 @@
                   icon="el-icon-plus"
                   class="ele-btn-icon"
                   @click="invoiceAll"
+                  v-if="$hasPermission('eom:saleManage:invoiceAll')"
                   :disabled="selection?.length === 0"
                 >
                   批量发货
@@ -70,6 +73,7 @@
                   size="small"
                   icon="el-icon-upload2"
                   @click="uploadFile"
+                  v-if="$hasPermission('eom:saleorder:save')"
                   >导入</el-button
                 >
                 <exportButton
@@ -106,9 +110,8 @@
                   icon="el-icon-edit"
                   @click="openEdit('edit', row)"
                   v-if="
-                    (isNeed_process_is_close &&
-                      [0, 3].includes(row.orderStatus)) ||
-                    !isNeed_process_is_close
+                    $hasPermission('eom:saleorder:update') &&
+                    [0, 3].includes(row.orderStatus)
                   "
                 >
                   修改
@@ -119,7 +122,8 @@
                   icon="el-icon-plus"
                   @click="saleOrderSubmitOrGenerate(row)"
                   v-if="
-                    isNeed_process_is_close && [0, 3].includes(row.orderStatus)
+                    [0, 3].includes(row.orderStatus) &&
+                    $hasPermission('eom:saleorder:update')
                   "
                 >
                   提交
@@ -143,9 +147,8 @@
                   title="确定要删除此信息吗?"
                   @confirm="remove([row.id])"
                   v-if="
-                    (isNeed_process_is_close &&
-                      [0, 3].includes(row.orderStatus)) ||
-                    !isNeed_process_is_close
+                    [0, 3].includes(row.orderStatus) &&
+                    $hasPermission('eom:saleorder:delete')
                   "
                 >
                   <template v-slot:reference>
@@ -163,7 +166,11 @@
                   :underline="false"
                   icon="el-icon-plus"
                   @click="handleCommand('invoice', row)"
-                  v-if="[2].includes(row.orderStatus) && row.needProduce != 2"
+                  v-if="
+                    [2].includes(row.orderStatus) &&
+                    row.needProduce != 2 &&
+                    $hasPermission('eom:saleordersendrecord:save')
+                  "
                 >
                   创建发货单
                 </el-link>
@@ -183,7 +190,11 @@
                   :underline="false"
                   icon="el-icon-plus"
                   @click="handleCommand('invoiceManage', row)"
-                  v-if="[2].includes(row.orderStatus) && !row.hasInvoiceApply"
+                  v-if="
+                    [2].includes(row.orderStatus) &&
+                    !row.hasInvoiceApply &&
+                    $hasPermission('eom:fininvoiceapply:save')
+                  "
                 >
                   新增发票
                 </el-link>
@@ -787,7 +798,7 @@
 
         this.processSubmitDialogFlag = true;
         let businessType =
-        this.current.needProduce == 1
+          this.current.needProduce == 1
             ? '有客户生产性订单'
             : this.current.needProduce == 2
             ? '无客户生产性订单'
@@ -821,7 +832,7 @@
 
       async saleOrderSubmitOrGenerate(res) {
         this.tableList = [];
-        this.current =  await getSaleOrderDetail(res.id);
+        this.current = await getSaleOrderDetail(res.id);
         if (!this.current.generatePurchase && !this.current.generateProduce) {
           this.saleOrderSubmit(res.id);
         } else {

+ 2 - 1
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -650,7 +650,8 @@
       },
       saveDate(data) {
         data.forEach((item, index) => {
-          item['totalCount'] = item.measureQuantity;
+          // item['totalCount'] = item.measureQuantity;
+          this.$set(data[index],'totalCount',item.measureQuantity)
           item['orderId'] = this.orderOption[0]?.orderId;
           item['orderNo'] = this.orderOption[0]?.orderNo;
 

+ 20 - 10
src/views/saleManage/saleOrder/returnGoods/components/inventoryTable.vue

@@ -179,7 +179,8 @@
         >
           <el-input
             v-model="scope.row.totalCount"
-            @input="(val) => changeNum(val, scope.$index)"
+            type="number"
+            @input="changeNum(scope.row, scope.$index)"
           ></el-input>
         </el-form-item>
       </template>
@@ -425,10 +426,10 @@
             showOverflowTooltip: true
           },
           {
-            minWidth: 100,
+            minWidth: 150,
             prop: 'totalCount',
-            // slot: 'totalCount',
-            label: '计量数量',
+            slot: 'totalCount',
+            label: '退货数量',
             showOverflowTooltip: true,
             align: 'center'
           },
@@ -602,9 +603,9 @@
       console.log(this.entrustedCode);
     },
     methods: {
-      downloadFile(file) {
-        getFile({ objectName: file.storePath }, file.name);
-      },
+      // downloadFile(file) {
+      //   getFile({ objectName: file.storePath }, file.name);
+      // },
 
       //出库单详情
       handleOutBound(e, rows, index) {
@@ -709,11 +710,20 @@
         // } else {
         //   this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', sendTotalWeight);
         // }
-        if (this.pricingWay == 2) {
-          this.getWeightPrice();
-        }
+        // if (this.pricingWay == 2) {
+        //   this.getWeightPrice();
+        // }
         this.$refs.table.reload();
       },
+      changeNum(row, index) {
+        if (row.totalCount && row.singlePrice) {
+          this.$set(
+            this.form.datasource[index],
+            'totalPrice',
+            row.totalCount * row.singlePrice
+          );
+        }
+      },
       //获取订单总金额
       gettotalAmount() {
         let productData = this.form.datasource;