Browse Source

修改bug

web100 2 years ago
parent
commit
d6ce86d5ac

+ 6 - 0
src/page/index/tags.vue

@@ -310,6 +310,12 @@ export default {
         if(tag.label == "库存账明细"){
           this.$store.commit("DOMAS_OUT_DETAIL");
         }
+        if(tag.label == "出库工单(L)"){
+          this.$store.commit("DOMIO_OUT_DETAIL");
+        }
+        if(tag.label == "采购入库"){
+          this.$store.commit("DOMIO_OUT_DETAIL");
+        }
         if (tag.label == "代理订单(N)") {
           this.$store.commit("DOMXS_OUT_DETAIL");
         }

+ 1 - 0
src/store/getters.js

@@ -40,6 +40,7 @@ const getters = {
   settleStatus: state => state.ifdetail.settleStatus,
   domSaleStatus: state => state.ifdetail.domSaleStatus,
   inventoryAccount:state => state.ifdetail.inventoryAccount,
+  inboundAndOutbound:state => state.ifdetail.inboundAndOutbound,
   domStockDetail: state => state.ifdetail.domStockDetail,
   domPurStatus: state => state.ifdetail.domPurStatus,
   purchaseStatus: state => state.ifdetail.purchaseStatus,

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

@@ -13,6 +13,7 @@ const ifdetail = {
     settleStatus: false, //结算明细
     domSaleStatus: false, // 内贸销售
     inventoryAccount:false,//库存账明细
+    inboundAndOutbound:false,//出入库工单明细账
     domPurchaseOrder: false,
     domStockDetail: false, // 国内库存账
     domPurStatus: false, // 内贸采购
@@ -234,6 +235,14 @@ const ifdetail = {
     DOMAS_OUT_DETAIL(state) {
       state.inventoryAccount = false;
     },
+    //打开出入库工单明细
+    DOMIO_IN_DETAIL(state) {
+      state.inboundAndOutbound = true;
+    },
+    //关闭出入库工单明细
+    DOMIO_OUT_DETAIL(state) {
+      state.inboundAndOutbound = false;
+    },
     DOMKC_IN_DETAIL(state) {
       state.domStockDetail = true;
     },
@@ -384,10 +393,16 @@ const ifdetail = {
       if (tag.label == '销售订单(N)') {
         state.domSaleStatus = true
       }
-      console.log('打开库存账明细');
       if (tag.label == '库存账明细') {
         state.inventoryAccount = true
       }
+      if (tag.label == '出库工单(L)') {
+        state.inboundAndOutbound = true
+      }
+      console.log(tag.label);
+      if (tag.label == '采购入库(L)') {
+        state.inboundAndOutbound = true
+      }
       if (tag.label == '采购订单(N)') {
         state.domPurStatus = true
       }

+ 1 - 0
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -483,6 +483,7 @@ export default {
               }
               revokeCollectionAndPayment(data).then((res => {
                 this.refresh(res.data.data.id)
+                this.editButton = false
                 this.$message.success('撤销收款成功')
                 loading.close()
               }))

+ 2 - 1
src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue

@@ -318,7 +318,7 @@ export default {
 
     },
     confirmEditing() {
-      this.editButton = false
+      this.editButton = true
       if (this.form.financeStatus == '已付款') {
         this.$set(this.optionForm, 'disabled', true)
         this.$set(this.optionContactsBack, 'disabled', true)
@@ -453,6 +453,7 @@ export default {
               }
               revokeCollectionAndPayment(data).then((res => {
                 this.refresh(res.data.data.id)
+                this.editButton = false
                 this.$message.success('撤销付款成功')
                 loading.close()
               }))

+ 140 - 144
src/views/tirePartsMall/inventory/detail.vue

@@ -1,127 +1,124 @@
 <template>
-    <basic-container>
-      <avue-crud
-        ref="crud"
-        :data="dataList"
-        :option="option"
-        v-model="form"
-        :search.sync="search"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-      >
-        <template slot="billno" slot-scope="{ row, index }">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(row, index)">{{ row.billno }}</span>
-        </template>
-      </avue-crud>
-    </basic-container>
-  </template>
+  <basic-container>
+    <avue-crud ref="crud" :data="dataList" :option="option" v-model="form" :search.sync="search" :table-loading="loading"
+      @saveColumn="saveColumn" @resetColumn="resetColumn" @search-change="searchChange" @current-change="currentChange"
+      @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+      <template slot="billno" slot-scope="{ row, index }">
+        <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(row, index)">{{ row.billno }}</span>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
   
-  <script>
-  import option from "./config/detail.json";
-  import {stockDataDetails} from "@/api/basicData/inventoryAccount";
-  
-  export default {
-    name: "detail",
-    data() {
-      return {
-        option: {},
-        dataList: [],
-        form: {},
-        page: {
-          pageSize: 10,
-          pagerCount: 5,
-          total: 0,
-        },
-        search: {},
-        loading: false,
-        params: null,
-      }
+<script>
+import option from "./config/detail.json";
+import { stockDataDetails } from "@/api/basicData/inventoryAccount";
+
+export default {
+  name: "detail",
+  data() {
+    return {
+      option: {},
+      dataList: [],
+      form: {},
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      search: {},
+      loading: false,
+      params: null,
+    }
+  },
+  async created() {
+    // this.option = option
+    console.log('打开了');
+    this.option = await this.getColumnData(this.getColumnName(279), option);
+    this.$store.commit("DOMAS_IN_DETAIL");
+  },
+  activated() {
+    this.$store.commit("DOMAS_IN_DETAIL");
+    this.params = {
+      goodsId: this.$route.query.goodsId,
+      stockId: this.$route.query.stockId
+    }
+    this.onLoad(this.page)
+  },
+  methods: {
+    onLoad(page, params) {
+      if (!this.params) return
+      params = { ...params, ...this.params }
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.loading = true;
+      stockDataDetails(params)
+        .then(res => {
+          console.log('res', res);
+          this.dataList = res.data.data ? res.data.data : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 260;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
-    async created() {
-      // this.option = option
-      console.log('打开了');
-      this.option = await this.getColumnData(this.getColumnName(279), option);
-      this.$store.commit("DOMAS_IN_DETAIL");
+    searchChange(params, done) {
+      this.onLoad(this.page, params);
+      done();
     },
-    activated() {
-    this.$store.commit("DOMAS_IN_DETAIL");
-      this.params = {
-        goodsId: this.$route.query.goodsId,
-        stockId:this.$route.query.stockId
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    refreshChange() {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.search);
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(279),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-      this.onLoad(this.page)
     },
-    methods: {
-      onLoad(page, params) {
-        if (!this.params) return
-        params = {...params, ...this.params}
-        this.dataList.forEach(item => {
-          this.$refs.crud.toggleRowExpansion(item, false)
-        })
-        this.loading = true;
-        stockDataDetails(params)
-          .then(res => {
-            console.log('res',res);
-            this.dataList = res.data.data? res.data.data : [];
-            this.page.total = res.data.data.total;
-            if (this.page.total) {
-              this.option.height = window.innerHeight - 260;
-            }
-          })
-          .finally(() => {
-            this.loading = false;
-          });
-      },
-      searchChange(params, done) {
-        this.onLoad(this.page, params);
-        done();
-      },
-      currentChange(val) {
-        this.page.currentPage = val;
-      },
-      sizeChange(val) {
-        this.page.currentPage = 1;
-        this.page.pageSize = val;
-      },
-      refreshChange() {
-        this.dataList.forEach(item => {
-          this.$refs.crud.toggleRowExpansion(item, false)
-        })
-        this.page.currentPage = 1;
-        this.onLoad(this.page, this.search);
-      },
-      async saveColumn() {
-        const inSave = await this.saveColumnData(
-          this.getColumnName(279),
-          this.option
-        );
-        if (inSave) {
-          this.$message.success("保存成功");
-          //关闭窗口
-          this.$refs.crud.$refs.dialogColumn.columnBox = false;
-        }
-      },
-      async resetColumn() {
-        this.option = option;
-        const inSave = await this.delColumnData(
-          this.getColumnName(279),
-          option
-        );
-        if (inSave) {
-          this.$message.success("重置成功");
-          //关闭窗口
-          this.$refs.crud.$refs.dialogColumn.columnBox = false;
-        }
-      },
-      // 跳转
-      beforeOpenPage(row,index) {
-        if(row.bizTypeName == '出库'){
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(
+        this.getColumnName(279),
+        option
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 跳转
+    beforeOpenPage(row, index) {
+      if (this.$store.getters.inboundAndOutbound) {
+        this.$alert("明细账已存在,请保存关闭明细账再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+            console.log(action);
+          }
+        });
+      } else {
+        if (row.bizTypeName == '出库') {
           this.$router.$avueRouter.closeTag("/tirePartsMall/salesManagement/outboundWorkOrder/index");
           this.$router.push({
             path: "/tirePartsMall/salesManagement/outboundWorkOrder/index",
@@ -129,7 +126,7 @@
               id: row.id
             },
           });
-        }else{
+        } else {
           this.$router.$avueRouter.closeTag("/tirePartsMall/purchasingManagement/warehouseEntryOrder/index");
           this.$router.push({
             path: "/tirePartsMall/purchasingManagement/warehouseEntryOrder/index",
@@ -138,31 +135,30 @@
             },
           });
         }
-        console.log(row);
-        return
-        if (this.$store.getters.domSaleStatus) {
-          this.$alert("销售单存在,请保存关闭销售单再进行操作", "温馨提示", {
-            confirmButtonText: "确定",
-            type: "warning",
-            callback: action => {
-              console.log(action);
-            }
-          });
-        } else {
-          this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
-          this.$router.push({
-            path: "/businessManagement/salesOrder/index",
-            query: {
-              id: row.id
-            },
-          });
-        }
-      },
+      }
+
+      return
+      if (this.$store.getters.domSaleStatus) {
+        this.$alert("销售单存在,请保存关闭销售单再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+            console.log(action);
+          }
+        });
+      } else {
+        this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
+        this.$router.push({
+          path: "/businessManagement/salesOrder/index",
+          query: {
+            id: row.id
+          },
+        });
+      }
     },
-  }
-  </script>
-  
-  <style scoped>
+  },
+}
+</script>
   
-  </style>
+<style scoped></style>
   

+ 4 - 1
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -629,11 +629,14 @@ export default {
         if (this.detailData.id) {
             this.refresh()
         }
+        this.$store.commit("DOMIO_IN_DETAIL");
     },
     components: {
         reportDialog
     },
-
+    activated(){
+        this.$store.commit("DOMIO_IN_DETAIL");
+    },
     methods: {
         rowAdd(row, score) {
             console.log(123214);

+ 9 - 0
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -381,6 +381,14 @@ export default {
       this.detailsOpen = true;
     }
   },
+  activated(){
+    // if (this.$route.query.id) {
+    //   this.detailData = {
+    //     id: this.$route.query.id
+    //   };
+    //   this.detailsOpen = true;
+    // }
+  },
   mounted() {
     // console.log(this.$refs.crud);
   },
@@ -396,6 +404,7 @@ export default {
         this.detailData = {}
       }
       this.onLoad(this.page, this.search)
+      // this.$store.commit("DOMIO_OUT_DETAIL");
     },
     //刷新
     refreshChange() {

+ 9 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -412,7 +412,13 @@ export default {
     if (this.detailData.id) {
       this.refresh()
     }
-
+    this.$store.commit("DOMIO_IN_DETAIL");
+  },
+  activated(){
+    if (this.detailData.id) {
+      this.refresh()
+    }
+    this.$store.commit("DOMIO_IN_DETAIL");
   },
   methods: {
     // 撤销出库
@@ -676,6 +682,8 @@ export default {
     },
     backToList(type) {
       this.$emit("backToList", type);
+      // this.$store.commit("DOMIO_OUT_DETAIL");
+
     }
   }
 }

+ 98 - 102
src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue

@@ -1,29 +1,19 @@
 <template>
   <div>
     <basic-container v-show="!detailsOpen">
-      <avue-crud
-          :option="option"
-          :search.sync="search"
-          v-model="form"
-          :table-loading="loading"
-          :data="dataList"
-          ref="crud"
-          :key="key"
-          @on-load="onLoad"
-          @search-change="searchChange"
-          @row-del="rowDel"
-          @expand-change="expandChange"
-          @refresh-change="refreshChange"
-          @resetColumn="resetColumnTwo('crud','option','optionList',270)"
-          @saveColumn="saveColumnTwo('crud','option','optionList',270)"
-          :page.sync="page">
-          <template slot-scope="{ row }" slot="expand">
+      <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+        ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
+        @expand-change="expandChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 270)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 270)" :page.sync="page">
+        <template slot-scope="{ row }" slot="expand">
           <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
             class="itemTable"></avue-crud>
         </template>
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button  :size="size" :disabled="row.status !== '待出库' && row.item >= 1" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
+          <el-button :size="size" :disabled="row.status !== '待出库' && row.item >= 1" :type="type"
+            @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
@@ -47,9 +37,9 @@
 </template>
 
 <script>
-import {getList, remove,getGoodsInfo} from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 import detailsPage from "./detailsPage"
-import { getDetails} from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import { getDetails } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 
 export default {
   name: "index",
@@ -77,59 +67,59 @@ export default {
         border: true,
         menu: false,
         column: [
-        {
-          label: '轮胎名称',
-          prop: 'goodsId',
-          disabled: true,
-          width: 200,
-          overHidden: true,
-          props: {
-            label: 'cname',
-            value: 'id'
-          },
-          dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
-        },{
-          label: '轮胎编码',
-          disabled: true,
-          prop: 'goodsNo',
-          width: 100
-        },  {
-          label: '品牌',
-          prop: 'brandId',
-          disabled: true,
-          width: 100,
-          overHidden: true,
-          props: {
-            label: 'cname',
-            value: 'id'
-          },
-          dicUrl: '/api/blade-sales-part/brandDesc/listAll'
-        }, {
-          label: '规格型号',
-          prop: 'propertyName',
-          disabled: true,
-          width: 100
-        }, {
-          label: '花纹',
-          prop: 'pattern',
-          disabled: true,
-          width: 100
-        }, {
-          label: '轮胎描述',
-          prop: 'goodsDescription',
-          disabled: true,
-        }, {
-          label: '批次号',
-          prop: 'dot',
-          type: 'select',
-          disabled: true,
-          dicData: [],
-          props: {
-            label: "dot",
-            value: "dot"
-          },
-          dicUrl: "/api/blade-sales-part/stockDesc/dotList",
-        }
+          {
+            label: '轮胎名称',
+            prop: 'goodsId',
+            disabled: true,
+            width: 200,
+            overHidden: true,
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+          }, {
+            label: '轮胎编码',
+            disabled: true,
+            prop: 'goodsNo',
+            width: 100
+          }, {
+            label: '品牌',
+            prop: 'brandId',
+            disabled: true,
+            width: 100,
+            overHidden: true,
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/brandDesc/listAll'
+          }, {
+            label: '规格型号',
+            prop: 'propertyName',
+            disabled: true,
+            width: 100
+          }, {
+            label: '花纹',
+            prop: 'pattern',
+            disabled: true,
+            width: 100
+          }, {
+            label: '轮胎描述',
+            prop: 'goodsDescription',
+            disabled: true,
+          }, {
+            label: '批次号',
+            prop: 'dot',
+            type: 'select',
+            disabled: true,
+            dicData: [],
+            props: {
+              label: "dot",
+              value: "dot"
+            },
+            dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+          }
         ]
       },
       option: {},
@@ -155,7 +145,7 @@ export default {
         dialogWidth: "70%",
         summaryText: "合计",
         showSummary: true,
-        sumColumnList:[{
+        sumColumnList: [{
           name: "goodsTotalNum",
           type: "sum",
           decimals: 2
@@ -204,12 +194,12 @@ export default {
           },
           dicUrl: '/api/blade-sales-part/storageDesc/listAll',
         }
-        // , {
-        //   label: '商品种类',
-        //   prop: "numberRows",
-        //   overHidden: true,
-        // }
-        ,  {
+          // , {
+          //   label: '商品种类',
+          //   prop: "numberRows",
+          //   overHidden: true,
+          // }
+          , {
           label: "订单数量",
           prop: "goodsTotalNum",
           search: false,
@@ -221,7 +211,7 @@ export default {
           search: false,
           overHidden: true,
           // width: 120,
-        } ,{
+        }, {
           label: '状态',
           prop: "statusName",
           search: true,
@@ -249,7 +239,7 @@ export default {
           label: '库管',
           prop: "stockClerkId",
           type: 'select',
-          search:true,
+          search: true,
           props: {
             label: 'realName',
             value: 'id'
@@ -324,15 +314,23 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
-    if(this.$route.query.id){
-            this.detailData = {
-                id:this.$route.query.id
-            };
-          this.detailsOpen = true;
+    if (this.$route.query.id) {
+      this.detailData = {
+        id: this.$route.query.id
+      };
+      this.detailsOpen = true;
     }
     console.log(this.$route.query);
 
   },
+  activated() {
+    if (this.$route.query.id) {
+      this.detailData = {
+        id: this.$route.query.id
+      };
+      this.detailsOpen = true;
+    }
+  },
   methods: {
     check(row) {
       this.form = row
@@ -382,9 +380,9 @@ export default {
         ...Object.assign(params, this.search)
       }
       this.loading = true
-        this.dataList.forEach(item => {
+      this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
-        });
+      });
       getList(params).then(res => {
         if (res.data.data.records) {
           res.data.data.records.forEach(e => {
@@ -393,7 +391,7 @@ export default {
         }
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
-         this.$nextTick(() => {
+        this.$nextTick(() => {
           this.$refs.crud.doLayout()
         })
         this.loading = false
@@ -402,16 +400,16 @@ export default {
       })
     },
     editOpen(row, status) {
-            this.form = row
-            this.detailData = {
-                id: row.id,
-                status: status
-            };
-            this.detailsOpen = true;
-        },
-      expandChange(row) {
+      this.form = row
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.detailsOpen = true;
+    },
+    expandChange(row) {
       if (!row.itemData) {
-        getDetails({ id: row.id})
+        getDetails({ id: row.id })
           .then(res => {
             this.dataList[row.$index].itemData = res.data.data.shipItemsList;
           })
@@ -447,6 +445,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>