Browse Source

事务bug

qinbai 3 years ago
parent
commit
3c1a5310c8

+ 11 - 0
src/api/importTrade/salesContract.js

@@ -71,3 +71,14 @@ export function generateShipment(data) {
     data:data
   })
 }
+//提单号带出合同号
+export function getOrgOrderNo(billNo) {
+  return request({
+    url: '/api/blade-purchase-sales/entranceOrder/findContractNoByBillNo',
+    method: 'get',
+    params:{
+      billNo:billNo
+    }
+  })
+}
+

+ 1 - 1
src/components/selectComponent/customerSelect.vue

@@ -15,7 +15,7 @@
           :value="item.id"
       />
     </el-select>
-    <el-button slot="append" icon="el-icon-edit" size="mini" @click="dialogVisible = true"
+    <el-button slot="append" icon="el-icon-search" size="mini" @click="dialogVisible = true"
                :disabled="disabled?disabled:false"></el-button>
   <el-dialog
     v-dialogdrag

+ 1 - 1
src/enums/column-name.js

@@ -1,6 +1,6 @@
 const columnName = [{
   code: 0,
-  name: '出口报价单'
+  name: 'processDialog'
 }, {
   code: 1,
   name: '出口报价单商品信息'

+ 20 - 10
src/views/purchase/contract/detailsPage.vue

@@ -148,10 +148,11 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="80%"
+      width="60%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
+      top="10vh"
       v-dialog-drag>
       <el-row style="height: 0;">
         <el-col :span="5">
@@ -179,9 +180,9 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false , selectKind = -1">取 消</el-button>
           <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true && selectKind == -1" :disabled="tableData.length !== 1">导入</el-button>
-          <el-button type="primary" @click="importChoice"  v-if="commodityData === true  && selectKind == -1"
-                     :disabled="tableData.length !== 1">导入<</el-button>
+<!--          <el-button type="primary" @click="importGoods" v-if="commodityData !== true && selectKind == -1" :disabled="tableData.length !== 1">导入</el-button>-->
+<!--          <el-button type="primary" @click="importChoice"  v-if="commodityData === true  && selectKind == -1"-->
+<!--                     :disabled="tableData.length !== 1">导入<</el-button>-->
         </span>
     </el-dialog>
     <el-dialog
@@ -568,6 +569,7 @@ export default {
           },   {
             label: '码单重量',
             prop: 'billWeight',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -618,11 +620,13 @@ export default {
           this.oldFilesList = this.deepClone(res.data.data.orderFilesList)
         }
       })
-    }else{
-      getSysNo("JK-CG").then(res =>{
-        this.$set(this.form,"sysNo", res.data.data)
-      })
     }
+    //赋值去掉
+    // else{
+    //   getSysNo("JK-CG").then(res =>{
+    //     this.$set(this.form,"sysNo", res.data.data)
+    //   })
+    // }
   },
   components: {
     feeInfo,
@@ -839,8 +843,9 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      this.dialogVisible = !this.dialogVisible
-      this.commodityData = false
+      this.$refs.crudContact.rowCellAdd();
+      // this.dialogVisible = !this.dialogVisible
+      // this.commodityData = false
     },
     //点击行可编辑
     handleRowClick(row, event, column) {
@@ -863,6 +868,11 @@ export default {
     },
     //商品详情list
     onLoad(page, params = {}) {
+      if (this.page.total) {
+        this.optionTwo.height = window.innerHeight - 520;
+      } else {
+        this.optionTwo.height = window.innerHeight - 475;
+      }
       this.loading = true;
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
         const data = res.data.data;

+ 0 - 1
src/views/salesManagement/salesContract/config/importInventory.json

@@ -24,7 +24,6 @@
       "prop": "billNo",
       "index": 1,
       "width":150,
-      "cell": true,
       "rules": [
         {
           "required": true,

+ 16 - 0
src/views/salesManagement/salesContract/detailsPage.vue

@@ -90,6 +90,15 @@
               ></el-input>
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
+            <template slot-scope="{row}" slot="billNo">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.billNo"
+                placeholder=" "
+                size="small"
+                @change="bingOut(row)"
+              ></el-input>
+            </template>
             <template slot="priceCategory" slot-scope="{row,index}">
               <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
               <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
@@ -217,6 +226,7 @@ import {detailSaleList,
   goodsListRemove,
   feesListRemove,
   updateListRemove,
+  getOrgOrderNo,
   generateShipment} from "@/api/importTrade/salesContract"
 import feeInfo from "@/components/fee-info/main";
 import {getSysNo} from "@/api/importTrade/purchase";
@@ -772,6 +782,12 @@ export default {
         })
       }
     },
+    //提单号带出合同号
+    bingOut(row){
+      getOrgOrderNo(row.billNo).then(res =>{
+        console.log(res.data)
+      })
+    },
     //商品明细导入
     newDetails(){
       this.dialogVisible = !this.dialogVisible

+ 5 - 7
src/views/workManagement/main-items/detailsPage.vue

@@ -7,6 +7,7 @@
         </el-button>
         <el-button type="success"
                    class="el-button--small-yh add-customer-btn-two"
+                   :disabled="true"
                    @click.stop="addMainProject">复制新单
         </el-button>
         <el-button class="el-button--small-yh add-customer-btn" type="primary"
@@ -476,7 +477,7 @@
         userOption:userOption,
         userLoading:false,
         userDataList:[],
-        userSelection:"",
+        userSelection:[],
         userTreeDeptId:"",
         userForm:{},
         userPage:{
@@ -681,6 +682,7 @@
               filesList:this.upLoadData
             }
             editMianProject(params).then(res =>{
+              this.id = res.data.data
              if(pleaseCheck === 10010){  //复制新单新单
                 this.$router.push({
                   path: "/mainItems_detailsPage",
@@ -715,20 +717,16 @@
       //请核
       pleaseCheck(){
         this.crudSelection.forEach(item =>{
-          let success = false;
           updateItemStatus(this.data[item.$index].id,1).then(res =>{
             if(res.data.success){
-              success = true
             }
           })
-          if(success){
             this.$message({
               type: "success",
               message: "请核成功!"
             });
-            //刷新列表
-            this.getProjectDetail();
-          }
+          //刷新列表
+          this.getProjectDetail();
         })
       },
       //返回主营项目列表