فهرست منبع

国内贸易修改

lichao 3 سال پیش
والد
کامیت
a664277104

+ 16 - 0
src/api/basicData/receipt.js

@@ -120,3 +120,19 @@ export function corpstypeTree() {
         method: 'get'
     })
 }
+//确认发货
+export function sendInGoods(data) {
+  return request({
+    url: '/api/blade-deliver-goods/delivery/comfire',
+    method: 'post',
+    data: data
+  })
+}
+// 撤销发货
+export function revokeInGoods(data) {
+  return request({
+    url: '/api/blade-deliver-goods/delivery/cancel',
+    method: 'post',
+    data: data
+  })
+}

+ 4 - 1
src/page/index/tags.vue

@@ -141,9 +141,12 @@ export default {
         if (tag.label == "收货单(E)") {
           this.$store.commit("REC_OUT_DETAIL");
         }
-        if (tag.label == "国内发货单") {
+        if (tag.label == "发货单(N)") {
           this.$store.commit("IN_OUT_DETAIL");
         }
+        if (tag.label == "收货单(N)") {
+          this.$store.commit("DOM_OUT_DETAIL");
+        }
         if (tag.label == "发货单(I)") {
           this.$store.commit("GO_OUT_DETAIL");
         }

+ 1 - 2
src/router/views/index.js

@@ -146,7 +146,7 @@ export default [{
                 name: '发货单(N)',
                 meta: {
                     i18n: 'businessManagement/deliveryNotice/index',
-                    keepAlive: true,
+                  keepAlive: true,
                 },
                 component: () => import( /* webpackChunkName: "views" */ '@/views/businessManagement/deliveryNotice/index')
             }
@@ -209,7 +209,6 @@ export default [{
                 path: '/businessManagement/receipt/index',
                 name: '收货单(N)',
                 meta: {
-                    i18n: 'businessManagement/receipt/index',
                     keepAlive: true,
                 },
                 component: () => import( /* webpackChunkName: "views" */ '@/views/businessManagement/receipt/index')

+ 1 - 0
src/store/getters.js

@@ -26,6 +26,7 @@ const getters = {
   logsFlag: (state, getters) => getters.logsLen === 0,
   flowRoutes: state => state.dict.flowRoutes,
   inStatus: state => state.ifdetail.inStatus,
+  domTakeStatus: state => state.ifdetail.domTakeStatus,
   goStatus: state => state.ifdetail.goStatus,
   takeStatus: state => state.ifdetail.takeStatus,
   outStatus: state => state.ifdetail.outStatus,

+ 16 - 3
src/store/modules/ifdetail.js

@@ -1,6 +1,7 @@
 const ifdetail = {
   state: {
-    inStatus: false, //国内
+    inStatus: false, //国内发货
+    domTakeStatus: false, // 国内收货
     goStatus: false, //进口发货单
     takeStatus: false, //进口发货单
     outStatus: false, //出口发货单
@@ -9,7 +10,7 @@ const ifdetail = {
   },
   actions: {},
   mutations: {
-    //国内状态
+    //国内状态发货单
     // 进入详情页
     IN_IN_DETAIL(state) {
       state.inStatus = true;
@@ -18,6 +19,15 @@ const ifdetail = {
     IN_OUT_DETAIL(state) {
       state.inStatus = false;
     },
+    // 国内收货单状态
+    // 进入详情页
+    DOM_IN_DETAIL(state) {
+      state.domTakeStatus = true;
+    },
+    //退出详情页
+    DOM_OUT_DETAIL(state) {
+      state.domTakeStatus = false;
+    },
     //进口发货单状态
     // 进入详情页
     GO_IN_DETAIL(state) {
@@ -74,9 +84,12 @@ const ifdetail = {
       for (let item in state) {
         state[item] = false
       }
-      if (tag.label == '国内发货单') {
+      if (tag.label == '发货单(N)') {
         state.inStatus = true;
       }
+      if (tag.label == '收货单(N)') {
+        state.domTakeStatus = true;
+      }
       if (tag.label == '进口发货单') {
         state.goStatus = true;
       }

+ 15 - 2
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -566,7 +566,6 @@ export default {
       let id = this.detailData.id
       this.queryData(id)
     }else if (this.detailData.form){
-      console.log(this.detailData.form)
       this.form = JSON.parse(this.detailData.form);
       delete this.form.createTime
       delete this.form.id
@@ -587,8 +586,10 @@ export default {
       this.$set(this.form, 'totalCost', 0)
       this.contactsData.forEach(item => {
         this.$set(item, "srcId", item.id)
-        this.$set(item, "actualQuantity", item.orderQuantity)
+        this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
         this.$set(item, "deliveryAmount", item.amount)
+        this.$set(item, "inventoryNumber", item.storageQuantity)
+        this.$set(item, "inventoryAmount", 0)
         this.form.deliveryAmount += Number(item.deliveryAmount)
         this.form.totalQuantity += Number(item.actualQuantity)
         this.form.totalCost += Number(item.deliveryAmount)
@@ -685,6 +686,10 @@ export default {
     // 出库数量变化时调用
     actualQuantityChange(row) {
       row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
+      this.contactsData.forEach(item => {
+        this.form.deliveryAmount += Number(item.deliveryAmount)
+        this.form.totalQuantity += Number(item.actualQuantity)
+      })
     },
     // 类别变换时触发
     warehouseTreeChange(id) {
@@ -1056,6 +1061,14 @@ export default {
     sendOutGoods() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          if (this.contactsData.length == 0) {
+            return this.$message.error('商品信息为空')
+          }
+          for (let item in this.contactsData) {
+            if (!this.contactsData[item].id) {
+              return this.$message.error('有商品未保存,请先保存')
+            }
+          }
           //商品信息
           this.form.deliveryItemsList = this.contactsData
           this.form.deliveryFeesList = this.advantageProjectData

+ 16 - 6
src/views/businessManagement/deliveryNotice/index.vue

@@ -118,12 +118,17 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(20), option);
-    if (this.$route.query.form) {
-      this.detailData = {
-        form: this.$route.query.form,
-      };
-      this.isShow = false;
-    }
+  },
+  activated() {
+    setTimeout(() => {
+      if (this.$route.query.form) {
+        this.detailData = {
+          form: this.$route.query.form,
+        };
+        this.$store.commit("IN_IN_DETAIL");
+        this.isShow = false;
+      }
+    }, 100);
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
@@ -187,6 +192,7 @@ export default {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("IN_IN_DETAIL");
     },
     //新增跳转页面
     beforeOpen(row, index) {
@@ -194,12 +200,14 @@ export default {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("IN_IN_DETAIL");
     },
     editOpen(row, index) {
       this.detailData = {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("IN_IN_DETAIL");
     },
     // 复制新单
     copyOrder() {
@@ -208,6 +216,7 @@ export default {
         copyId: id,
       };
       this.isShow = false;
+      this.$store.commit("IN_IN_DETAIL");
     },
     //点击新增时触发
     beforeClose(done) {
@@ -273,6 +282,7 @@ export default {
     goBack() {
       this.detailData=this.$options.data().detailData
       this.isShow = true;
+      this.$store.commit("IN_OUT_DETAIL");
     },
     //列保存触发
     async saveColumn() {

+ 1 - 2
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -94,7 +94,7 @@
       ]
     },{
       "label": "订货数量",
-      "prop": "orderQuantity",
+      "prop": "purchaseQuantity",
       "index": 5,
       "width":100,
       "cell": false,
@@ -126,7 +126,6 @@
       "index": 6,
       "width":100,
       "cell": false,
-      "slot": true,
       "rules": [
         {
           "required": false,

+ 44 - 24
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -56,14 +56,14 @@
               @selection-change="productSelection"
               @saveColumn="saveColumn('goods')"
           >
-            <template slot="orderQuantity" slot-scope="{ row }">
+            <template slot="purchaseQuantity" slot-scope="{ row }">
               <el-input
                 v-if="row.$cellEdit"
-                v-model="row.orderQuantity"
+                v-model="row.purchaseQuantity"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                size="small"
                 @input="changeContractAmt(row)"
               ></el-input>
-              <span v-else>{{ row.orderQuantity }}</span>
+              <span v-else>{{ row.purchaseQuantity }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -115,7 +115,7 @@
                          icon="el-icon-plus"
                          size="small"
                          :disabled="selection.length < 1"
-                         @click="generateShipmentC">生成收货单
+                         @click="getShipmentC">生成收货单
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -410,6 +410,7 @@ import bankOfDeposit from "./configuration/bankOfDeposit.json"
 import commodity from "./configuration/commodity.json"
 import optionTwoCost from "./configuration/mainListCost.json"
 import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
+import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 
 export default {
   name: "detailsPage",
@@ -628,6 +629,7 @@ export default {
   },
   //初始化查询
   async created() {
+    // this.customerContact = customerContact
     this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
@@ -730,6 +732,20 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    getShipmentC() {
+      console.log(this.$store.getters.domTakeStatus)
+      if (this.$store.getters.domTakeStatus) {
+        this.$alert("收货单存在,请保存发货单再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+            console.log(action);
+          }
+        });
+      } else {
+        this.generateShipmentC();
+      }
+    },
     //生成收货单
     generateShipmentC() {
       let lsit = []
@@ -794,6 +810,7 @@ export default {
     //商品新增触发
     commoditySelection() {
       this.dialogVisible = !this.dialogVisible
+      this.tableData = []
       this.commodityData = false
     },
     //点击费用明细选择触发
@@ -861,24 +878,27 @@ export default {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
-          console.log(this.tableData[item])
-          this.tableData[item].itemId = this.tableData[item].id
-          this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
-          delete this.tableData[item].id
-          this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
-          this.$set(this.tableData[item], 'priceType', '一般')
-          this.$set(this.tableData[item], 'orderQuantity', 0)
-          this.$set(this.tableData[item], 'actualQuantity', 0)
-          this.$set(this.tableData[item], 'storageQuantity', 0)
-          this.tableData[item].price = 0
-          this.tableData[item].amount = 0
-          this.tableData[item].sort = this.maxGoodsNum + 1
-          this.maxGoodsNum++
-          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
-          this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
+          selectGoodsNum({
+            goodsId: this.tableData[item].id,
+            typeno: this.tableData[item].specs
+          }).then(res => {
+            this.tableData[item].storageQuantity =  res.data.data
+            this.tableData[item].itemId = this.tableData[item].id
+            this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
+            delete this.tableData[item].id
+            this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
+            this.$set(this.tableData[item], 'priceType', '一般')
+            this.$set(this.tableData[item], 'orderQuantity', 0)
+            this.$set(this.tableData[item], 'actualQuantity', 0)
+            this.tableData[item].price = 0
+            this.tableData[item].amount = 0
+            this.tableData[item].sort = this.maxGoodsNum + 1
+            this.maxGoodsNum++
+            this.$refs.crudContact.rowCellAdd(this.tableData[item]);
+            this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
+          })
         }
       }
-      this.tableData = []
       this.dialogVisible = false
     },
     closeGoods() {
@@ -1065,15 +1085,15 @@ export default {
     },
     // 计算费用
     changeContractAmt(row) {
-      let orderQuantity = 0;
+      let purchaseQuantity = 0;
       let price = 0;
       if (row.price) {
         price = row.price;
       }
-      if (row.orderQuantity) {
-        orderQuantity = row.orderQuantity;
+      if (row.purchaseQuantity) {
+        purchaseQuantity = row.purchaseQuantity;
       }
-      this.$set(row, "amount", Number(orderQuantity) * Number(price)).toFixed(2);
+      this.$set(row, "amount", Number(purchaseQuantity) * Number(price)).toFixed(2);
     },
     // 去重
     removeRepeat() {

+ 8 - 7
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -124,28 +124,29 @@
         }
       ]
     },{
-      "label": "入库数量",
-      "prop": "actualQuantity",
+      "label": "采购金额",
+      "prop": "purchaseAmount",
       "index": 6,
       "width":100,
       "cell": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入入库数量",
+          "message": "请输入采购金额",
           "trigger": "blur"
         }
       ]
     },{
-      "label": "采购金额",
-      "prop": "purchaseAmount",
+      "label": "入库数量",
+      "prop": "actualQuantity",
       "index": 6,
       "width":100,
-      "cell": true,
+      "cell": false,
+      "slot": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入采购金额",
+          "message": "请输入入库数量",
           "trigger": "blur"
         }
       ]

+ 100 - 134
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -9,6 +9,20 @@
       </div>
       <el-button
         class="el-button--small-yh add-customer-btn"
+        style="right: 245px;"
+        type="primary"
+        @click="revokeInGoods"
+        v-if="form.deliveryStatus !== '录入'"
+      >撤销收货</el-button>
+      <el-button
+        class="el-button--small-yh add-customer-btn"
+        style="right: 245px;"
+        type="primary"
+        @click="sendInGoods"
+        v-if="form.deliveryStatus == '录入'"
+      >确认收货</el-button>
+      <el-button
+        class="el-button--small-yh add-customer-btn"
         type="success" style="right: 140px;" @click="copyOrder">
         复制新单
       </el-button>
@@ -82,6 +96,15 @@
               >{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
             </template>
+            <template slot="actualQuantity" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.actualQuantity"
+                v-input-limit="0"
+                @change="actualQuantityChange(row)"
+              ></el-input>
+              <span v-else>{{ row.actualQuantity }}</span>
+            </template>
             <template slot="menuLeft" slot-scope="{size}">
               <el-button type="primary"
                          icon="el-icon-plus"
@@ -229,138 +252,6 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
-    <!--打印-->
-    <el-dialog
-        title="打印单"
-        append-to-body
-        class="el-dialogDeep"
-        :visible.sync="printVisible"
-        width="100%"
-        fullscreen
-        :close-on-click-modal="false"
-        :close-on-press-escape="false">
-      <div class="print-div">
-        <div
-            style="
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-item: center;
-            font-size: 24px;
-            margin-bottom: 5px;
-            width: 100%;
-            text-align: center;
-          "
-        >
-          <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
-          <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
-          <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
-          <div>
-            <b>COMMERCIAL INVOICE</b>
-            <span style="float: right">ORIGINAL</span>
-          </div>
-        </div>
-        <div class="print_table" style="display: flex">
-          <table
-              border="0"
-              cellspacing="0"
-              cellpadding="0"
-              style="width: 100%; line-height: 30px"
-          >
-            <tr>
-              <td colspan="5" rowspan="3">MESSERS:</td>
-              <td colspan="2">INVOICE NO.</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">DATE</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">INCOTERM .</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="5">PI NO.:</td>
-              <td colspan="2">DELIVERY PORT</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td rowspan="2">NO.</td>
-              <td rowspan="2">DESCRIPTION</td>
-              <td>THICK</td>
-              <td>LENGTH</td>
-              <td>WIDTH</td>
-              <td rowspan="2">SHEETS</td>
-              <td rowspan="2">CRATES</td>
-              <td>UNIT PRICE</td>
-              <td>TOTAL</td>
-              <td>T. AMOUNT</td>
-            </tr>
-            <tr>
-              <td>mm</td>
-              <td>mm</td>
-              <td>mm</td>
-              <td>US$/M²</td>
-              <td>M²</td>
-              <td>US$</td>
-            </tr>
-            <tr>
-              <td>1</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>2</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>3</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">INSURANCE:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">TOTAL:</td>
-              <td>0.00</td>
-            </tr>
-          </table>
-        </div>
-        <div class="print-footer" style="margin-top: 8px">
-          <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
-          </div>
-        </div>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
@@ -372,7 +263,9 @@ import {
   corpsbank,
   corpsfiles,
   corpsitem,
-  getList
+  getList,
+  sendInGoods,
+  revokeInGoods
 } from "@/api/basicData/receipt"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
@@ -382,6 +275,7 @@ import optionTwoCost from "./configuration/mainListCost.json"
 import {getDeptLazyTree, customerList,getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
 import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
 import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
+import {revokeOutGoods} from "../../../api/basicData/deliveryNotice";
 
 export default {
   name: "detailsPage",
@@ -562,6 +456,7 @@ export default {
           },{
             label: '入库金额',
             prop: 'deliveryAmount',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -572,6 +467,7 @@ export default {
           }, {
             label: '采购金额',
             prop: 'purchaseAmount',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -582,6 +478,7 @@ export default {
           },{
             label: '入库数量',
             prop: 'totalQuantity',
+            disabled: true,
             rules: [
               {
                 required: true,
@@ -671,7 +568,6 @@ export default {
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     }else if (this.detailData.form){
-      console.log(this.detailData.form)
       this.form = JSON.parse(this.detailData.form);
       delete this.form.createTime
       delete this.form.id
@@ -687,7 +583,18 @@ export default {
         this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
       }
       delete this.form.belongToCorpList
+      this.$set(this.form, 'deliveryAmount', 0)
+      this.$set(this.form, 'totalQuantity', 0)
+      this.$set(this.form, 'purchaseAmount', 0)
       this.contactsData.forEach(item => {
+        this.$set(item, "srcId", item.id)
+        this.$set(item, "deliveryAmount", item.amount)
+        this.$set(item, "actualQuantity", (Number(item.purchaseQuantity) - Number(item.actualQuantity)))
+        // 入库数量和入库金额的比例
+        this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
+        this.form.deliveryAmount += Number(item.deliveryAmount)
+        this.form.totalQuantity += Number(item.actualQuantity)
+        this.form.purchaseAmount += Number(item.deliveryAmount)
         delete item.id
         delete item.pid
       })
@@ -706,6 +613,12 @@ export default {
         this.advantageProjectData = this.form.deliveryFeesList
         this.bankOfDepositData = this.form.deliveryFilesList
         this.configuration.dicData = this.form.corpName
+        this.contactsData.forEach(item => {
+          this.form.deliveryAmount += Number(item.deliveryAmount)
+          this.form.totalQuantity += Number(item.actualQuantity)
+          // 入库金额和入库数量的比例
+          this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
+        })
         let feesData = []
         this.form.deliveryFeesList.forEach(item => {
           let a = {
@@ -769,6 +682,10 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    // 入库数量变化时调用
+    actualQuantityChange(row) {
+      row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
+    },
     // 类别变换时触发
     warehouseTreeChange(id) {
       this.warehouseName = []
@@ -1087,6 +1004,55 @@ export default {
       this.configuration.dicData = this.configuration.dicData.concat(data)
       this.removeRepeat()
     },
+    // 确认收货
+    sendInGoods() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.contactsData.length == 0) {
+            return this.$message.error('商品信息为空')
+          }
+          for (let item in this.contactsData) {
+            if (!this.contactsData[item].id) {
+              return this.$message.error('有商品未保存,请先保存')
+            }
+          }
+          //商品信息
+          this.form.deliveryItemsList = this.contactsData
+          this.form.deliveryFeesList = this.advantageProjectData
+          this.form.deliveryFilesList = this.bankOfDepositData
+          if (typeof this.form.corpsTypeId == 'object') {
+            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
+          }
+          sendInGoods(this.form).then(res => {
+            console.log(res)
+            this.$message.success('收货成功')
+            this.queryData(res.data.data.id)
+          })
+        } else {
+          return false;
+        }
+      });
+    },
+    // 撤销收货
+    revokeInGoods() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          //商品信息
+          this.form.deliveryItemsList = this.contactsData
+          this.form.deliveryFeesList = this.advantageProjectData
+          this.form.deliveryFilesList = this.bankOfDepositData
+          if (typeof this.form.corpsTypeId == 'object') {
+            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
+          }
+          revokeInGoods(this.form).then(res => {
+            this.$message.success('撤销成功')
+            this.queryData(res.data.data.id)
+          })
+        } else {
+          return false;
+        }
+      });
+    },
     //修改提交触发
     editCustomer(isBack = false) {
       console.log(this.form)

+ 16 - 8
src/views/businessManagement/receipt/index.vue

@@ -91,14 +91,17 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(23), option);
-    // this.onLoad()
-    if (this.$route.query.form) {
-      console.log(this.$route.query.form)
-      this.detailData = {
-        form: this.$route.query.form,
-      };
-      this.isShow = false;
-    }
+  },
+  activated() {
+    setTimeout(() => {
+      if (this.$route.query.form) {
+        this.detailData = {
+          form: this.$route.query.form,
+        };
+        this.$store.commit("DOM_IN_DETAIL");
+        this.isShow = false;
+      }
+    }, 100);
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
@@ -162,6 +165,7 @@ export default {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("DOM_IN_DETAIL");
     },
     //新增跳转页面
     beforeOpen(row, index) {
@@ -169,12 +173,14 @@ export default {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("DOM_IN_DETAIL");
     },
     editOpen(row, index) {
       this.detailData = {
         id: row.id,
       };
       this.isShow = false;
+      this.$store.commit("DOM_IN_DETAIL");
     },
     // 复制新单
     copyOrder() {
@@ -183,6 +189,7 @@ export default {
         copyId: id,
       };
       this.isShow = false;
+      this.$store.commit("DOM_IN_DETAIL");
     },
     //点击新增时触发
     beforeClose(done) {
@@ -249,6 +256,7 @@ export default {
     goBack() {
       this.detailData=this.$options.data().detailData
       this.isShow = true;
+      this.$store.commit("DOM_OUT_DETAIL");
     },
     //列保存触发
     async saveColumn() {

+ 14 - 2
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -121,7 +121,7 @@
                          icon="el-icon-plus"
                          size="small"
                          :disabled="selection.length < 1"
-                         @click="generateShipmentD">生成发货单
+                         @click="getShipmentD">生成发货单
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -1145,6 +1145,19 @@ export default {
     policy() {
       this.policyDialog = !this.policyDialog
     },
+    getShipmentD() {
+      if (this.$store.getters.inStatus) {
+        this.$alert("发货单存在,请保存发货单再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+            console.log(action);
+          }
+        });
+      } else {
+        this.generateShipmentD();
+      }
+    },
     //生成发货单
     generateShipmentD() {
       let lsit = []
@@ -1269,7 +1282,6 @@ export default {
             goodsId: this.tableData[item].id,
             typeno: this.tableData[item].specs
           }).then(res => {
-            console.log(this.tableData)
             this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
             this.tableData[item].storageQuantity =  res.data.data
             delete this.tableData[item].goodsTypeName

+ 2 - 2
src/views/wel/components/butCard.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="padding:5px">
-    <div class="card">
+    <div class="card el-button--primary">
       <div class="card-content">
         <i :class="iconName"></i>
         <div>{{ name }}</div>
@@ -28,7 +28,7 @@ export default {
 
 <style lang="scss" scoped>
 .card{
-  background: #ff7d13;
+  //background: #ff7d13;
   display: flex;
   justify-content: center;
   align-items: center;