Ver código fonte

修改货代报表 hblno 轮胎 更新库存

Qukatie 5 meses atrás
pai
commit
25b03f419b

+ 7 - 0
src/api/iosBasicData/bills.js

@@ -27,6 +27,13 @@ export const billsGetBillNo = (data) => {
     data: data
   })
 }
+export const removeHblNo = (params) => {
+  return request({
+    url: '/api/blade-los/bills/removeHblNo',
+    method: 'get',
+    params: params
+  })
+}
 // 海运出口详情
 export const billsDetail = (id) => {
   return request({

+ 2 - 1
src/views/iosBasicData/AirtransportExport/bills/assembly/businessReports.vue

@@ -119,6 +119,7 @@
             {
               label: "中文名称",
               prop: "cnName",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入中文名称",
@@ -864,7 +865,7 @@
       },
 
       searchReset() {
-        this.query = {};
+        this.query = this.query = this.$options.data().query;
         this.onLoad(this.page);
       },
       searchChange(params, done) {

+ 2 - 1
src/views/iosBasicData/AirtransportImport/bills/assembly/businessReports.vue

@@ -119,6 +119,7 @@
             {
               label: "中文名称",
               prop: "cnName",
+              search: true,
               rules: [{
                 required: true,
                 message: "请输入中文名称",
@@ -864,7 +865,7 @@
       },
 
       searchReset() {
-        this.query = {};
+        this.query = this.query = this.$options.data().query;
         this.onLoad(this.page);
       },
       searchChange(params, done) {

+ 2 - 1
src/views/iosBasicData/OceanFreightImport/bills/assembly/businessReports.vue

@@ -107,6 +107,7 @@ export default {
           {
             label: "中文名称",
             prop: "cnName",
+            search: true,
             rules: [{
               required: true,
               message: "请输入中文名称",
@@ -852,7 +853,7 @@ export default {
     },
 
     searchReset() {
-      this.query = {};
+      this.query = this.query = this.$options.data().query;
       this.onLoad(this.page);
     },
     searchChange(params, done) {

+ 40 - 7
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -1762,14 +1762,47 @@ export default {
                 this.$message.warning("请选择一条数据");
                 return;
             }
-            this.detailData.seeDisabled = false
-            this.detailData.id = this.selectionList[0].id
-            this.isShow = false
-            this.$nextTick(() => {
-                this.$refs.billsDetails.pageLoading = true
-                this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id,'复制费用,复制箱型箱量')
+            this.$DialogForm.show({
+                title: '复制单据',
+                width: '300px',
+                menuPosition: 'right',
+                data: { checkbox: '复制费用,复制箱型箱量' },
+                option: {
+                    submitText: '确认',
+                    emptyText: '取消',
+                    span: 24,
+                    column: [{
+                        label: "复制类型",
+                        prop: "checkbox",
+                        type: 'checkbox',
+                        dicData: [{
+                            label: '复制费用',
+                            value: '复制费用',
+                        }, {
+                            label: '复制箱型箱量',
+                            value: '复制箱型箱量'
+                        }],
+                        dataType: 'string',
+                        span: 24,
+                    }]
+                },
+                beforeClose: (done) => {
+                    done()
+                },
+                callback: (res) => {
+                    res.done()
+                    this.detailData.seeDisabled = false
+                    this.detailData.id = this.selectionList[0].id
+                    this.isShow = false
+                    this.$nextTick(() => {
+                        this.$refs.billsDetails.pageLoading = true
+                        this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id, res.data.checkbox)
+                    })
+                    this.$store.commit("IN_OCEANFI_DETAIL");
+                    res.close()
+                }
             })
-            this.$store.commit("IN_OCEANFI_DETAIL");
+
         },
         // 编辑详情打开
         rowCellfun(id, row) {

+ 8 - 8
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/PackingBusiness.vue

@@ -339,14 +339,14 @@ export default {
                             trigger: "blur"
                         }]
                     },
-                    {
-                        label: "商品英文名称",
-                        prop: "commodityEnName",
-                        labelWidth: 130,
-                        width: "120",
-                        display: false,
-                        overHidden: true,
-                    },
+                    // {
+                    //     label: "商品英文名称",
+                    //     prop: "commodityEnName",
+                    //     labelWidth: 130,
+                    //     width: "120",
+                    //     display: false,
+                    //     overHidden: true,
+                    // },
                     {
                         label: "货物短描",
                         prop: "commodityShortDescr",

+ 2 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/businessReports.vue

@@ -107,6 +107,7 @@ export default {
           {
             label: "中文名称",
             prop: "cnName",
+            search: true,
             rules: [{
               required: true,
               message: "请输入中文名称",
@@ -851,7 +852,7 @@ export default {
     },
 
     searchReset() {
-      this.query = {};
+      this.query = this.$options.data().query;
       this.onLoad(this.page);
     },
     searchChange(params, done) {

+ 29 - 18
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -87,7 +87,7 @@
                                                                 @click="applyforfun(item[0].label)">{{ item[0].label }}
                                                             </span>
                                                             <span v-else style="color: #1e9fff">{{ item[0].label
-                                                                }}</span>
+                                                            }}</span>
                                                         </span>
                                                         <span v-if="item[0].type == 'button'"></span>
                                                         <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
@@ -313,7 +313,7 @@ import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
 import {
     billsCheckBills, billsCopyBills,
     billsDetail,
-    billsGetBillNo,
+    billsGetBillNo,removeHblNo,
     billsListAll, billsRevokeCheckBills, editypesSendingEdi,
     billsSubmit,
     billsAdd,
@@ -1591,13 +1591,6 @@ export default {
                 });
                 return
             }
-            if (this.form.hblno) {
-                this.$message({
-                    message: 'B/L NO 只能申请一次',
-                    type: 'warning'
-                });
-                return
-            }
             if (!this.form.businessType) {
                 this.$message({
                     message: '请先选择业务类型',
@@ -1612,13 +1605,31 @@ export default {
                 });
                 return
             }
-            this.$confirm(`确定${text}?`, {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(res => {
-                this.billsGetBillNofun()
-            })
+            if (this.form.hblno) {
+                this.$confirm(`确定删除${text}?`, {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(res => {
+                    
+                    removeHblNo({id:this.form.id}).then(res=>{
+                        this.form.hblno=null
+                        this.billsSubmitfun()
+                    })
+                })
+            } else {
+                if (!this.form.hblno) {
+                    this.$confirm(`确定${text}?`, {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(res => {
+                        this.billsGetBillNofun()
+                    })
+                }
+            }
+
+
         },
         // 配置项
         columnforfun(value) {
@@ -2016,10 +2027,10 @@ export default {
                 //     res.data.data.feeCenterListD = []
                 //     res.data.data.feeCenterListC = []
                 // }
-                if(types.indexOf("复制箱型箱量")<0){
+                if (types.indexOf("复制箱型箱量") < 0) {
                     res.data.data.preContainersList = []
                 }
-                if(types.indexOf("复制费用")<0){
+                if (types.indexOf("复制费用") < 0) {
                     res.data.data.feeCenterListD = []
                     res.data.data.feeCenterListC = []
                 }

+ 48 - 15
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -892,12 +892,12 @@ export default {
                         span: 6,
                         searchOrder: 11,
                     },
-                    {
-                        label: "交货地",
-                        prop: "placeDeliveryName",
-                        width: "120",
-                        overHidden: true,
-                    },
+                    // {
+                    //     label: "交货地",
+                    //     prop: "placeDeliveryName",
+                    //     width: "120",
+                    //     overHidden: true,
+                    // },
                     {
                         label: "航线",
                         prop: "lineCnName",
@@ -1269,7 +1269,7 @@ export default {
                             value: '结清'
                         }],
                         width: "100",
-                        searchLabelWidth:'100',
+                        searchLabelWidth: '100',
                         overHidden: true,
                     },
                     {
@@ -1288,7 +1288,7 @@ export default {
                             value: '结清'
                         }],
                         width: "100",
-                        searchLabelWidth:'100',
+                        searchLabelWidth: '100',
                         overHidden: true,
                     },
                     {
@@ -1917,14 +1917,47 @@ export default {
                 this.$message.warning("请选择一条数据");
                 return;
             }
-            this.detailData.seeDisabled = false
-            this.detailData.id = this.selectionList[0].id
-            this.isShow = false
-            this.$nextTick(() => {
-                this.$refs.billsDetails.pageLoading = true
-                this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id, '') // 复制费用,复制箱型箱量
+            this.$DialogForm.show({
+                title: '复制单据',
+                width: '300px',
+                menuPosition: 'right',
+                data: { checkbox: '复制费用,复制箱型箱量' },
+                option: {
+                    submitText: '确认',
+                    emptyText: '取消',
+                    span: 24,
+                    column: [{
+                        label: "复制类型",
+                        prop: "checkbox",
+                        type: 'checkbox',
+                        dicData: [{
+                            label: '复制费用',
+                            value: '复制费用',
+                        }, {
+                            label: '复制箱型箱量',
+                            value: '复制箱型箱量'
+                        }],
+                        dataType: 'string',
+                        span: 24,
+                    }]
+                },
+                beforeClose: (done) => {
+                    done()
+                },
+                callback: (res) => {
+                    res.done()
+                    this.detailData.seeDisabled = false
+                    this.detailData.id = this.selectionList[0].id
+                    this.isShow = false
+                    this.$nextTick(() => {
+                        this.$refs.billsDetails.pageLoading = true
+                        this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id, res.data.checkbox)
+                    })
+                    this.$store.commit("IN_SEAFE_DETAIL");
+                    res.close()
+                }
             })
-            this.$store.commit("IN_SEAFE_DETAIL");
+
         },
         // 编辑详情打开
         rowCellfun(id, row) {

+ 75 - 3
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -26,12 +26,23 @@
       </trade-card>
       <trade-card title="明细信息">
         <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.shipItemsList"
-          :key="key" @row-save="rowSave" @row-update="rowUpdate"
+          :key="key" @row-save="rowSave" @row-update="rowUpdate" @selection-change="selectionContacts"
           @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)"
           @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)">
-          <template slot-scope="scope" slot="menuLeft">
+          <template slot-scope="{scope,row}" slot="menuLeft">
             <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
             <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
+            <el-popover width="800" trigger="click"  placement="right">
+              <avue-crud :data="inventoryData" :option="inventoryOption">
+                <template slot-scope="{row}" slot="menu">
+                  <el-button type="text" icon="el-icon-refresh" size="small" :disabled="row.storageId != form.storageId"
+                    @click.stop="synchronous(row)">更新库存
+                  </el-button>
+                </template>
+              </avue-crud>
+              <el-button type="primary" plain size="small" slot="reference" @click="viewInventory"
+                :disabled="selectionMultilist.length != 1">同步库存</el-button>
+            </el-popover>
           </template>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
             <el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
@@ -103,12 +114,53 @@ import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntry
 import { isProcurement } from "@/api/basicData/configuration";
 import dialogAssembly from "@/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue";
 import { getKh } from "@/api/tirePartsMall/salesManagement/saleOrder";
-
+import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
 
 export default {
   name: "detailsPage",
   data() {
     return {
+      selectionMultilist: [],
+      inventoryData: [],
+      inventoryOption: {
+        header: false,
+        menu: true,
+        menuWidth: 90,
+        editBtn: false,
+        delBtn: false,
+        column: [
+          {
+            label: '商品名称',
+            prop: 'cname',
+            overHidden: true,
+          },
+          {
+            label: '仓库',
+            prop: 'storageName',
+            overHidden: true,
+          },
+          {
+            label: '结余数量',
+            prop: 'balanceQuantity',
+            overHidden: true,
+          },
+          {
+            label: '结余数量(融资)',
+            prop: 'balanceQuantityFinancing',
+            overHidden: true,
+          },
+          {
+            label: '结余数量(自有)',
+            prop: 'balanceQuantityHave',
+            overHidden: true,
+          },
+          {
+            label: '批次号',
+            prop: 'dot',
+            overHidden: true,
+          }
+        ]
+      },
       whetherFinancing: 0,
       picihaolist: [], // 批次号数据
       tableData: [],
@@ -252,6 +304,8 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         showSummary: true,
+        tip: false,
+        selection: true,
         sumColumnList: [
           {
             name: 'goodsNum',
@@ -270,6 +324,7 @@ export default {
           label: '商品编码',
           disabled: true,
           prop: 'goodsNo',
+          overHidden: true,
           width: 100
         }, {
           label: '批次号',
@@ -789,6 +844,23 @@ export default {
     this.$store.commit("DOMIO_IN_ALLOCATW");
   },
   methods: {
+    viewInventory() {
+      inventoryList({ cname: this.selectionMultilist[0].goodsName, dot: this.selectionMultilist[0].dot, storageId: this.form.storageId }).then(res => [
+        this.inventoryData = res.data.data.records
+      ])
+    },
+    synchronous(row) {
+      this.form.shipItemsList.forEach(e => {
+        if (e.goodsName == this.selectionMultilist[0].goodsName) {
+          e.inventory = row.balanceQuantity
+          e.inventoryFinancing = row.balanceQuantityFinancing
+          e.inventoryHave = row.balanceQuantityHave
+        }
+      })
+    },
+    selectionContacts(list) {
+      this.selectionMultilist = list
+    },
     // 撤销调拨
     revoke() {
       this.$refs["form"].validate((valid, done) => {

+ 0 - 3
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -2476,8 +2476,6 @@ export default {
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                     });
-
-
                     // this.form.orderItemsList.forEach(its => {
                     //     console.log(its.goodsId);
                     //     console.log(its.goodsName);
@@ -2485,7 +2483,6 @@ export default {
                     //     let goodsName = its.goodsId
                     //     its.goodsId = its.goodsName
                     //     its.goodsName = goodsName
-
                     // })
                     for (let courierCompanies of this.courierCompaniesList) {
                         if (courierCompanies.dictValue === this.form.logisticsCorpName) {