Sfoglia il codice sorgente

【修改】家用、商用工程单

howie 2 anni fa
parent
commit
02b823a1cf

+ 1 - 1
src/components/Common/check-order.vue

@@ -93,7 +93,7 @@ export default {
 
     // 获取详情
     getDetail() {
-      checkOrder({mainOrderId: this.checkOrderId}).then(res => {
+      checkOrder({mainOrderId: this.checkOrderId }).then(res => {
         if(res.data) {
           res.data.forEach(item => {
             item.sums1 = ['refundableQty'];

+ 5 - 3
src/views/supply/engin/components/commerce_detail.vue

@@ -503,7 +503,8 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        closeCom({id: this.listItem.parentId}).then(res => {
+        closeCom({id: this.listItem.parentId, refEnginRecordNo: this.detailData.refEnginRecordNo || '',
+}).then(res => {
           this.$successMsg();
           this.getDetail();
         })
@@ -517,7 +518,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        overOrder({id: this.listItem.parentId}).then(res => {
+        overOrder({id: this.listItem.parentId, refEnginRecordNo: this.detailData.refEnginRecordNo || '',}).then(res => {
           this.$successMsg();
           this.getDetail();
         })
@@ -569,7 +570,8 @@ export default {
             deliverDate: this.deliverForm.date + ' 00:00:00',
             correspondId: this.deliverForm.position,
             remark:this.deliverForm.remark,
-            items: this.deliverGoodsList
+            items: this.deliverGoodsList,
+            refEnginRecordNo: this.detailData.refEnginRecordNo || '',
           }
           deliverOrder(params).then(res => {
             this.$successMsg();

+ 18 - 6
src/views/supply/engin/components/commerce_form.vue

@@ -179,7 +179,7 @@
     <div class="main-title">
       <div class="title">货品信息</div>
       <div>
-        <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px">
+        <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px"  @change="setStock">
           <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
         </el-select>
         <el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
@@ -273,11 +273,9 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
-        <!-- <el-table-column align="center" label="总仓库" prop="status1" min-width="100" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <div>{{ scope.row.status1 | status1Filter }}</div>
-          </template>
-        </el-table-column> -->
+        <el-table-column align="center" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
+
+        </el-table-column>
         <el-table-column align="center" label="仓库状态" prop="status2" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <div>{{ status2Filter(scope.row) }}</div>
@@ -557,7 +555,19 @@ export default {
     goBack() {
       this.$emit('backListFormDetail');
     },
+    setStock(id){
+      if (this.goodsList.length) {
+        const item = this.warehouseList.find(e=>e.id === id)
+        console.log(item);
+          this.goodsList.forEach(k=>{
+            k.correspondName = item.name
+            this.$set(k,'correspondName',item.name)
+            this.$set(k,'correspondId',item.id)
 
+          })
+      }
+
+    },
     getDate() {
       var date = new Date();
       var seperator1 = "-";
@@ -935,6 +945,8 @@ export default {
             remark: this.mainForm.remark || '',
             fileNo: this.mainForm.fileNo || '',
             serviceId: this.mainForm.salesMan,
+            correspondId:goodsList[0].correspondId,
+            correspondName:goodsList[0].correspondName,
             serviceName: saleManItem ? saleManItem.nickName : goodsList[0].serviceName,
             items: goodsList,
           }

+ 2 - 1
src/views/supply/engin/components/commerce_return.vue

@@ -298,7 +298,8 @@ export default {
         let params = {
           enginOrderId: this.detailData.enginOrderId,
           items: this.detailData.items,
-          refundNote: this.returnForm.remark
+          refundNote: this.returnForm.remark,
+          refEnginRecordNo:this.detailData.refEnginRecordNo,
         };
         returnCom(params).then(res => {
           this.$successMsg();

+ 5 - 3
src/views/supply/engin/components/home_detail.vue

@@ -16,6 +16,7 @@
               <div class="label">工程订单号</div>
               <div class="value">{{detailData.enginOrderNo}}</div>
             </el-col>
+
             <el-col :span="8" class="item">
               <div class="label">订单日期</div>
               <div class="value">{{detailData.orderDate}}</div>
@@ -530,7 +531,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        closeHome({id: this.listItem.parentId}).then(res => {
+        closeHome({id: this.listItem.parentId, refEnginRecordNo:this.detailData.refEnginRecordNo,}).then(res => {
           this.$successMsg();
           this.getDetail();
         })
@@ -544,7 +545,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        overOrder({id: this.listItem.parentId}).then(res => {
+        overOrder({id: this.listItem.parentId, refEnginRecordNo:this.detailData.refEnginRecordNo,}).then(res => {
           this.$successMsg();
           this.getDetail();
         })
@@ -596,7 +597,7 @@ export default {
             deliverDate: this.deliverForm.date + ' 00:00:00',
             correspondId: this.deliverForm.position,
             remark:this.deliverForm.remark,
-
+            refEnginRecordNo:this.detailData.refEnginRecordNo,
             items: this.deliverGoodsList
           }
           this.formLoading = true;
@@ -704,6 +705,7 @@ export default {
       editRemarkHome({
         enginOrderId: this.detailData.enginOrderId,
         geLiInerNote: this.detailData.geLiInerNote,
+        refEnginRecordNo:this.detailData.refEnginRecordNo,
       }).then(res => {
         this.$successMsg('编辑成功');
         this.getDetail();

+ 1 - 0
src/views/supply/engin/components/home_examine.vue

@@ -518,6 +518,7 @@ export default {
         let params = JSON.parse(JSON.stringify(this.detailData));
         params.examineNote = this.examineForm.remark;
         params.examineResult = val;
+        params.refEnginRecordNo=this.detailData.refEnginRecordNo,
         params.saleTypeId = this.detailData.saleTypeId;
         params.saleTypeCode = saleTypeItem.saleCode;
         params.saleTypeName = saleTypeItem.saleName;

+ 5 - 1
src/views/supply/engin/components/home_form.vue

@@ -843,6 +843,7 @@ export default {
         recordNo: this.screenForm.loginNum,
         projectName: this.screenForm.enginName,
         useUnit: this.screenForm.company,
+        refEnginRecordNo:this.mainForm.loginNum,
         examineStatus: 'OK'
       }).then(res => {
         this.dialogTable_dataList = res.data.records;
@@ -893,7 +894,9 @@ export default {
         saleTypeId: this.mainForm.saleType,
         userId: uid,
         enginOrderId: this.mainForm.orderNum,
-        customerId: customerId
+        customerId: customerId,
+        refEnginRecordNo:this.mainForm.loginNum,
+
       }).then(async res => {
         // 复制当前明细数据
         let copyGoodsList = JSON.parse(JSON.stringify(this.goodsList));
@@ -1050,6 +1053,7 @@ export default {
         specification: this.goodsScreenForm.proModel,
         price1: this.goodsScreenForm.price1,
         price2: this.goodsScreenForm.price2,
+        refEnginRecordNo:this.mainForm.loginNum,
         customerId:this.listItem ?this.listItem.customerId :'' ,
       }).then(res => {
         let oldGoodsList = this.goodsList;

+ 2 - 1
src/views/supply/engin/components/home_return.vue

@@ -333,7 +333,8 @@ export default {
         let params = {
           enginOrderId: this.detailData.enginOrderId,
           items: this.detailData.items,
-          refundNote: this.returnForm.remark
+          refundNote: this.returnForm.remark,
+          refEnginRecordNo:this.detailData.refEnginRecordNo,
         };
         returnHome(params).then(res => {
           this.$successMsg();