Selaa lähdekoodia

调拨单修改

黄梓星 2 vuotta sitten
vanhempi
commit
73f5d20e45

+ 1 - 2
src/views/purchase/MaterialClassDivision/index.vue

@@ -199,12 +199,11 @@
               导出<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
               <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
 
-          <el-button type="primary" size="small">同步分配</el-button>
           <el-button type="primary" size="small">删除</el-button>
         </div>
         <el-table 

+ 40 - 3
src/views/purchase/transferOrder/add.vue

@@ -43,7 +43,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调拨方式">
-              <el-select v-model="basicForm.allotType" :disabled="sonDisable" size="small" style="width: 200px" clearable>
+              <el-select v-model="basicForm.allotType" disabled size="small" style="width: 200px" clearable>
                 <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
                 </el-option>
               </el-select>
@@ -117,7 +117,7 @@
               <el-input
                 v-model="basicForm.onRouteAffilliation"
                 size="small"
-                :disabled="sonDisable"
+                disabled
                 clearable
                 style="width: 200px"
               />
@@ -224,7 +224,7 @@
       <el-tabs style="margin-top: 10px;" type="border-card">
         <el-tab-pane label="物料信息">
           <div class="btn_grooup">
-            <el-button type="primary" size="small" @click="addLine">增行</el-button>
+            <el-button type="primary" size="small" v-if="!sonDisable" @click="addLine">增行</el-button>
           </div>
           <el-table
           :data="materialInfo" 
@@ -540,6 +540,8 @@
 <script>
 import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
 import Refers from '@/components/Refers/refers.vue'
+// 用于回显参照框数据
+import { getRefer } from '@/api/purchase/basic.js'
 import TreeRefers from '@/components/Refers/treeRefer.vue'
 // 明细行选择物料参照
 import popDialog from '@/components/PopDialog/index.vue'
@@ -676,6 +678,35 @@ export default {
           this.receiveInfo = res.data.stAllotReceiveDeliverList
           this.priceList = res.data.stAllotReceiveExecuteList
           this.resultList = res.data.stAllotReceiveExpenseList
+          if(this.basicForm.deliveryInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.deliveryInventoryOrg, '调出库存组织') }
+          if(this.basicForm.storageInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.storageInventoryOrg, '调入库存组织') }
+          if(this.basicForm.businessPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.businessPersonal) }
+          if(this.basicForm.deliveryDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.deliveryDept) }
+          if(this.basicForm.currency) { this.reBackRefer('CURRENCY_PARAM', this.basicForm.currency) }
+          if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
+        }
+      })
+    },
+    // 回显参照框
+    reBackRefer(type, id, title) {
+      getRefer({ type: type, id: id, title: title }).then(res => {
+        if (type == 'ORG_PARAM' && title == '调出库存组织') {
+          this.chuOrgOptions = res.rows
+        }
+        if (type == 'ORG_PARAM' && title == '调入库存组织') {
+          this.ruOrgOptions = res.rows
+        }
+        if (type == 'CONTACTS_PARAM') {
+          this.manOptions = res.rows
+        }
+        if (type == 'DEPT_PARAM') {
+          this.deptOptions = res.rows
+        }
+        if (type == 'CURRENCY_PARAM') {
+          this.currencyOptions = res.rows
+        }
+        if (type == 'LIACENTER_PARAM') {
+          this.liacenterOptions = res.rows
         }
       })
     },
@@ -741,6 +772,12 @@ export default {
         this.basicForm.storageInventoryOrg = selection[0].id
         this.basicForm.storageInventoryOrgName = selection[0].name
         this.basicForm.onRouteAffilliation = selection[0].name
+        // 选择调入库存组织时判断调拨方式
+        if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
+          this.basicForm.allotType = '4'
+        } else {
+          this.basicForm.allotType = '2'
+        }
       }
       if (this.referCondition.title == '调出业务员') {
         this.manOptions = selection

+ 2 - 2
vue.config.js

@@ -37,12 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        // target: `http://test-sy.derom.com/drp-admin`, //测试
+        target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地