Selaa lähdekoodia

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!94
黄梓星 2 vuotta sitten
vanhempi
commit
9fecda40de

+ 1 - 1
src/api/business/purchase/purchase-order.js

@@ -104,7 +104,7 @@ const payRequest = (userCode) => {
 
   return new Promise(resolve => {
     // 当前 Promise 的状态由传入的 Promise 去决定
-    axios.get(`${process.env.NODE_ENV == "development" ? '/sy-derom' : 'https://sy.derom.com'} /apiproxy/service/ssoRegServlet?userCode=${userCode}&busiCenter=001`)
+    axios.get(`${process.env.NODE_ENV == "development" ? '/sy-derom' : 'https://sy.derom.com'}/apiproxy/service/ssoRegServlet?userCode=${userCode}&busiCenter=001`)
     .then(res =>{
       if(res.status == 200){
         resolve(res.data)

+ 3 - 3
src/views/purchase/DemandSummary/index.vue

@@ -416,11 +416,11 @@ export default {
           case '0':
             return '需补货'
           case '1':
-            return '待采购确认'
+            return '待计划确认'
           case '2':
-            return '采购已确认'
+            return '计划已确认'
           case '3':
-            return '采购已审核'
+            return '计划已审核'
           case '4':
             return '行关闭'
           case '5':

+ 5 - 5
src/views/purchase/PurchaseDemandList/add.vue

@@ -587,11 +587,11 @@ export default {
         case '0':
           return '需补货'
         case '1':
-          return '待采购确认'
+          return '待计划确认'
         case '2':
-          return '采购已确认'
+          return '计划已确认'
         case '3':
-          return '采购已审核'
+          return '计划已审核'
         case '4':
           return '行关闭'
         case '5':
@@ -851,12 +851,12 @@ export default {
       this.$refs.refer.init(this.referCondition)
     },
     selectionsToInput(selection) {
-      if(this.referCondition.type == 'ORG_PARAM') {
+      if(this.referCondition.type == 'ORG_PARAM' && this.referCondition.title == '选择组织') {
         this.orgOptions = selection
         this.basicForm.org = selection[0].id
         this.basicForm.orgName = selection[0].name
       }
-      if(this.referCondition.type == 'CUSTOMER_PARAM') {
+      if(this.referCondition.type == 'CUSTOMER_PARAM' && this.referCondition.title == '选择客户') {
         this.customerOptions = selection
         this.basicForm.customer = selection[0].id
         this.basicForm.customerName = selection[0].name

+ 0 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -174,7 +174,6 @@ export default {
 
           // 是否完成询价,新增明细行需默认明细为false
           rowData["whetherCompleteInquiry"] = false;
-          console.log(rowData,'rowData');
           this.params[key].push(rowData);
         }
       }

+ 7 - 1
src/views/purchase/purchase-order/column.js

@@ -27,6 +27,13 @@ export const TableColumns = [
   // { key: "supplier", title: "供应商" },
   { key: "supplierName", title: "供应商", inputType: "Input" },
   { key: "paymentAgreementName", title: "付款协议" },
+  {
+    key: "source",
+    title: "订单来源",  
+    inputType: "Select",
+    referName: "order_source", // 字典名
+    width:80,
+  },
   // { key: "paymentAgreement", title: "付款协议" },
   
   // { key: "buyer", title: "采购员" },ut
@@ -130,7 +137,6 @@ export const TableColumns = [
   { key: "operatingItemsName", title: "经营性项目" },
   { key: "isArrivalReson", title: "到货超期原因" },
   { key: "midOrderNo", title: "中台采购订单号" },
-  { key: "remark", title: "备注" },
 ];
 
 export const TabColumns = [

+ 29 - 18
src/views/purchase/purchase-order/index.vue

@@ -218,21 +218,35 @@ export default {
     },
     //  整单退回
     handleAllSendBack() {
-      let data = {
-        id: this.checkedList[0].id,
-        documentIds: [],
-        baskCause: ''
-      }
-      console.log(data);
-      try {
-        this.loading = true;
-        let { code, msg } = orderApi.documentsReturn(data);
-
-      } catch (error) {
 
-      } finally {
-        this.loading = false;
-      }
+      this.$prompt('请输入退回原因', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          inputPattern: /\s*\S+?/,
+          inputErrorMessage: '退回原因不能为空'
+        }).then(({ value }) => {
+          let data = {
+            id: this.checkedList[0].id,
+            documentIds: [],
+            baskCause: value,
+          };
+          console.log(data);
+          try {
+
+            let { code, msg } = orderApi.documentsReturn(data);
+
+            if (code == 200) {
+
+              this.fetchList(this.params, this.page);
+
+            }
+          } catch (error) {
+          } finally {
+          }
+        }).catch(() => {    
+        });
+      
+      
     },
     // 判断是否满足整单关闭
     judgeIsAllClose() {
@@ -253,8 +267,6 @@ export default {
       // 未审批状态下整单关闭
       try {
 
-        this.loading = true;
-
         let puOrderIds = this.checkedList.map(order => {
 
           return order.id;
@@ -272,7 +284,6 @@ export default {
       } catch (error) {
 
       } finally {
-        this.loading = false;
       }
     },
     // 付款协议
@@ -303,7 +314,7 @@ export default {
       console.log(this.checkedList, 'this.checkedList');
 
     },
-  },
+  }
 };
 </script>
 

+ 2 - 2
src/views/purchase/transferOrder/add.vue

@@ -158,7 +158,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调入仓库">
-              <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventory, 'N', 'N')" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
                 <el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -279,7 +279,7 @@
           <el-table-column show-overflow-tooltip label="调入部门" align="center" prop="storageDeptName" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.storageDeptName" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.storageDeptName" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"></el-button>
                 </el-input>
               </el-form-item>