ソースを参照

Merge branch 'linwenxin_dev' into moss_dev

* linwenxin_dev:
  no message
  no message
  no message
  销售退货单 根据发货单号显示退货数量和金额
  no message
  no message
  no message
  no message
  no message
  no message
  no message
  no message
  no message
  no message
  no message
  no message
Moss 1 年間 前
コミット
6f6bf9e35a

+ 2 - 1
src/views/auxiliaryFittings/purchasingManagement/components/inStorage.vue

@@ -59,6 +59,7 @@ export default {
         "updateTime": "",
         "venderId": "",
         "venderName": "",
+        storageId:"",
         "websitId": "",
         "websitName": "",
         items: [],
@@ -137,7 +138,7 @@ export default {
     passExamination() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          websitPurchaseInConfirm({ purchaseId: this.formData.purchaseId, flag: "OK" }).then(res => {
+          websitPurchaseInConfirm({ purchaseId: this.formData.purchaseId, flag: "OK", storageId: this?.formData?.storageId  }).then(res => {
             this.$message({ type: 'success', message: `审核通过!` })
             this.formCancel()
             this.$refs.pageRef.refreshList()

+ 2 - 1
src/views/auxiliaryFittings/purchasingManagement/components/retStorage.vue

@@ -63,6 +63,7 @@ export default {
         "updateTime": "",
         "venderId": "",
         "venderName": "",
+        storageId:"",
         "websitId": "",
         "websitName": "",
         items: [],
@@ -141,7 +142,7 @@ export default {
     passExamination(flag) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          websitPurchaseRetConfirm({ purchaseRetId: this.formData.purchaseRetId, flag: flag }).then(res => {
+          websitPurchaseRetConfirm({ purchaseRetId: this.formData.purchaseRetId, flag: flag, storageId: this?.formData?.storageId }).then(res => {
             this.$message({ type: 'success', message: flag=='OK'?`审核通过!`:'驳回通过' })
             this.formCancel()
             this.$refs.pageRef.refreshList()

+ 87 - 26
src/views/auxiliaryFittings/purchasingManagement/mixins/form_tpl.js

@@ -12,6 +12,7 @@ import {
 } from '@/api/purchasingManagement.js'
 import { commonTemplateDownload } from '@/api/common.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
+import { storageListPageV2 } from "@/api/storage";
 export default {
   data() {
     return {
@@ -34,7 +35,8 @@ export default {
       materialNormList: [],
       peijianList: [],
       websitPurchaseInList: [],
-      listPageV2Data: []
+      listPageV2Data: [],
+      cangkuList: []
     }
   },
   computed: {
@@ -224,6 +226,7 @@ export default {
                               materialNormList({
                                 isShowStockQty: true,
                                 websitId: this.formData.websitId,
+                                storageId: this.formData.storageId,
                                 pageNum: 1,
                                 pageSize: -1,
                                 params: [
@@ -760,10 +763,10 @@ export default {
                 <el-descriptions
                   border
                   title=""
-                  column={2}
+                  column={4}
                   colon={false}
                   labelStyle={{ width: '8%' }}
-                  contentStyle={{ width: '42%' }}
+                  contentStyle={{ width: '17%' }}
                   style="margin-top:-1px"
                 >
                   <el-descriptions-item label="网点名称">
@@ -779,29 +782,15 @@ export default {
                           disabled={this.formDialogType >= 2}
                           onChange={val => {
                             this.formData.items = []
+                            this.formData.storageId = ""
+                            this.formData.storageName = ""
+                            this.cangkuList = []
+                            this.getStorageListPageV2(val)
                             if (val) {
                               this.formData['websitName'] = this.getWebsitList.find(item => item.websitId == val).name
                             } else {
                               this.formData['websitName'] = ''
                             }
-                            if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
-                              if (val) {
-                                peijianList({
-                                  isShowStockQty: true,
-                                  websitId: val,
-                                  pageNum: 1,
-                                  pageSize: -1,
-                                  params: [
-                                    { param: 'a.status', compare: '=', value: 'ON' },
-                                    { param: 'a.norm_type', compare: '=', value: 'M' }
-                                  ]
-                                }).then(res => {
-                                  this.peijianList = res.data.records
-                                })
-                              } else {
-                                this.peijianList = []
-                              }
-                            }
                             this.getorderlist()
                             this.$nextTick(this.jiaoyan)
                           }}
@@ -843,6 +832,57 @@ export default {
                       </el-form-item>
                     </div>
                   </el-descriptions-item>
+                  <el-descriptions-item label={!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name)?'出库仓库':"入库仓库"}>
+                    <div class="redbordererr">
+                      <el-form-item label="" lebel-width="0px" prop={`storageId`} rules={required}>
+                        <el-select
+                          style="width:100%"
+                          disabled={this.formDialogType === 2 || !(!this.formData.id || (this.formDialogType === 1) || (this.formDialogType === 3 && this.formData.isImport==true && !!this.formData.id))}
+                          value={this.formData.storageId}
+                          onInput={val => {
+                            this.formData.storageId = val
+                          }}
+                          placeholder="请选择"
+                          onChange={val => {
+                            if (val) {
+                              this.formData['storageName'] = this.cangkuList.find(
+                                item => item.storageId == val
+                              )?.storageName
+                            } else {
+                              this.formData['storageName'] = ''
+                            }
+                            if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
+                              if (val) {
+                                peijianList({
+                                  isShowStockQty: true,
+                                  websitId: this.formData.websitId,
+                                  storageId: this.formData.storageId,
+                                  pageNum: 1,
+                                  pageSize: -1,
+                                  params: [
+                                    { param: 'a.status', compare: '=', value: 'ON' },
+                                    { param: 'a.norm_type', compare: '=', value: 'M' }
+                                  ]
+                                }).then(res => {
+                                  this.peijianList = res.data.records
+                                })
+                              } else {
+                                this.peijianList = []
+                              }
+                            }
+                            this.$nextTick(this.jiaoyan)
+                          }}
+                        >
+                          {this.cangkuList.map(item => (
+                            <el-option key={item.storageId} label={item.storageName} value={item.storageId}></el-option>
+                          ))}
+                        </el-select>
+                      </el-form-item>
+                    </div>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="">
+                    
+                  </el-descriptions-item>
                 </el-descriptions>
                 {!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.$route?.name) ? (
                   <el-descriptions
@@ -893,6 +933,7 @@ export default {
                                       materialNormList({
                                         isShowStockQty: true,
                                         websitId: this.formData.websitId,
+                                        storageId: this.formData.storageId,
                                         pageNum: 1,
                                         pageSize: -1,
                                         params: [
@@ -1103,18 +1144,39 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
+    // 获取
+    getStorageListPageV2(websitId){
+      if(websitId){
+        storageListPageV2({
+          "pageNum":1, 
+          "pageSize":-1, 
+          "params":[
+            {"param":"a.websit_id","compare":"=","value": websitId},
+            {"param":"a.type","compare":"like","value": (()=>{
+              if(~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)){
+                return "辅材"
+              }else if (~['partsStorage', 'partsReturn'].indexOf(this.$route?.name)) {
+                return "配件"
+              }
+              return ""
+            })()},
+            {"param":"a.status","compare":"=","value":"true"},
+          ]
+        }).then(res => {
+          this.cangkuList = res.data.records
+        })
+      }
+    },
     // 打开
     openForm() {
+      this.getStorageListPageV2(this?.formData?.websitId)
       this.getorderlist(false)
-
       var req = [getWebsit({ type: 'C', status: true })]
-
       var runs = [
         res => {
           this.getWebsitList = res.data.filter(item => item.type == 'C')
         }
       ]
-      console.log(this.$route?.name)
       if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
         req.push(
           ...[
@@ -1156,7 +1218,6 @@ export default {
           ]
         )
       }
-
       if (~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.$route?.name)) {
         req.push(
           ...[
@@ -1194,6 +1255,7 @@ export default {
             peijianList({
               isShowStockQty: true,
               websitId: this.formData.websitId,
+              storageId: this.formData.storageId,
               pageNum: 1,
               pageSize: -1,
               params: [
@@ -1211,7 +1273,6 @@ export default {
           ]
         )
       }
-
       Promise.all(req).then(ress => {
         ress.forEach((res, index) => {
           runs[index](res)

+ 4 - 4
src/views/mallManagement/order/sales_deliver_order_list/index.vue

@@ -67,10 +67,10 @@
                 {{scope.row.goodsMaterialUnit == 'C' ? '整套' : scope.row.goodsMaterialUnit == 'I' ? '单个' : ''}}
               </template>
             </el-table-column>
-            <el-table-column prop="num" align="center" label="数量"></el-table-column>
-            <el-table-column prop="insideNum" align="center" label="内机数量"></el-table-column>
-            <el-table-column prop="outNum" align="center" label="外机数量"></el-table-column>
-            <el-table-column prop="partNum" align="center" label="配件数量"></el-table-column>
+            <el-table-column prop="sendNum" align="center" label="数量"></el-table-column>
+            <el-table-column prop="sendInsideCodeQty" align="center" label="内机数量"></el-table-column>
+            <el-table-column prop="sendOutCodeQty" align="center" label="外机数量"></el-table-column>
+            <el-table-column prop="sendPartsCodeQty" align="center" label="配件数量"></el-table-column>
             <el-table-column prop="insideCodeQty" align="center" label="导入内机条码数量" width="140"></el-table-column>
             <el-table-column prop="outCodeQty" align="center" label="导入外机条码数量" width="140"></el-table-column>
             <el-table-column prop="partsCodeQty" align="center" label="导入配件条码数量" width="140"></el-table-column>

+ 9 - 11
src/views/mallManagement/order/sales_return_order_list/index.vue

@@ -177,13 +177,13 @@
               <el-table-column align="center" label="订单单价" prop="price" min-width="120"></el-table-column>
               <el-table-column align="center" label="订单金额" prop="payAmount" min-width="120"></el-table-column>
 
-              <el-table-column align="center" label="操作" min-width="100" fixed="right" v-if="goodsList.length > 1">
+              <!-- <el-table-column align="center" label="操作" min-width="100" fixed="right" v-if="goodsList.length > 1">
                 <template slot-scope="scope">
                   <el-popconfirm title="确定删除吗?" @confirm="deleteGoods(scope.$index)">
                     <el-button slot="reference" type="text">删除</el-button>
                   </el-popconfirm>
                 </template>
-              </el-table-column>
+              </el-table-column> -->
             </el-table>
           </div>
           <div v-show="formTabs == 'b'">
@@ -209,14 +209,13 @@
               </el-table-column>
               <el-table-column align="center" label="条码" prop="materialCode" min-width="120"></el-table-column>
               <el-table-column align="center" label="数量" prop="stockQty" min-width="120"></el-table-column>
-              <el-table-column align="center" label="操作" min-width="100" fixed="right" v-if="codeList.length > 1">
+              <!-- <el-table-column align="center" label="操作" min-width="100" fixed="right" v-if="codeList.length > 1">
                 <template slot-scope="scope">
                   <el-popconfirm title="确定删除吗?" @confirm="deleteCode(scope.$index)">
                     <el-button slot="reference" type="text">删除</el-button>
                   </el-popconfirm>
                 </template>
-              </el-table-column>
-
+              </el-table-column> -->
             </el-table>
           </div>
           <div v-show="formTabs == 'c'">
@@ -654,7 +653,11 @@ export default {
           const dData = res.data;
           this.formData.deliveryId = dData.deliveryId;
           this.formData.deliverStorageName = dData.storageStockName;
-
+          dData.orderDetailSendList.forEach(item => {
+            item.waitRefundNum = item.sendNum;
+            item.waitRefundPrice = item.price;
+          })
+          this.goodsList = dData.orderDetailSendList;
           getOrderDetail({ orderId: dData.orderId }).then((res) => {
             const oData = res.data;
             this.formData.orderId = oData.orderId;
@@ -666,11 +669,6 @@ export default {
             this.formData.receUserName = oData.receUserName;
             this.formData.recePhone = oData.recePhone;
             this.formData.receAddress = oData.receAddress;
-            oData.orderDetails.forEach(item => {
-              item.waitRefundNum = item.sendNum;
-              item.waitRefundPrice = item.price;
-            })
-            this.goodsList = oData.orderDetails;
             this.oldList = oData.orderOldProductDTOList;
           })
           getOrderCodeList({orderId: dData.orderId}).then(res => {