Qukatie 2 gadi atpakaļ
vecāks
revīzija
5c990c246f

+ 7 - 1
src/api/basicData/Inventory.js

@@ -10,4 +10,10 @@ export const getList = (current, size, params) => {
             size,
         }
     })
-}
+}
+export function getAllgoods() {
+    return request({
+      url: '/api/blade-client/goodsdesc/descListAll',
+      method: 'get',
+    })
+  }

+ 13 - 0
src/api/basicData/product.js

@@ -62,4 +62,17 @@ export const itemRemove = (data) => {
         method: 'post',
         data: data
     })
+}
+export function getAllgoods() {
+    return request({
+      url: '/api/blade-client/goodsdesc/descListAll',
+      method: 'get',
+    })
+  }
+  export const disabled = (data) => {
+    return request({
+        url: '/api/blade-client/goodsDescParts/update',
+        method: 'post',
+        params: data
+    })
 }

+ 1 - 1
src/api/basicData/salesOrder.js

@@ -72,7 +72,7 @@ export const getCorpType = (data) => {
     params:data
   })
 }
-export function getAllgoodstype() {
+export function getAllgoods() {
   return request({
     url: '/api/blade-client/goodsdesc/descListAll',
     method: 'get',

+ 15 - 7
src/views/Inventory/index.vue

@@ -48,7 +48,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList} from "@/api/basicData/Inventory";
+import { getList,getAllgoods} from "@/api/basicData/Inventory";
 export default {
   name: "index",
   data() {
@@ -79,17 +79,25 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      // getCorpsAll().then(res => {
-      //   this.findObject(this.option.column, "id").dicData = res.data.data;
-      //   this.findObject(this.option.column, "ids").dicData = res.data.data;
-      // })
+      this.getWorkDicts("label").then(res => {
+        this.findObject(this.option.column, "label").dicData = res.data.data;
+      });
+      this.getWorkDicts("unit").then(res => {
+        this.findObject(this.option.column, "unit").dicData = res.data.data;
+      });
+      this.getWorkDicts("goods_status").then(res => {
+        this.findObject(this.option.column, "status").dicData = res.data.data;
+      });
+      getAllgoods().then(res => {
+        this.findObject(this.option.column, "goods").dicData = res.data.data
+      });
       this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 92;
+        this.option.height = this.option.height - 42;
       } else {
-        this.option.height = this.option.height + 92;
+        this.option.height = this.option.height + 42;
       }
       this.$refs.crud.getTableHeight();
     },

+ 58 - 28
src/views/Inventory/js/optionList.js

@@ -17,96 +17,126 @@ export const option = {
   searchIndex: 2,
   column: [
     {
-      label: "产品分类",
-      prop: "type",
+      label: "产品名称",
+      prop: "goods",
+      type: "select",
+      dicData: [],
+      filterable:true,
+      props: {
+        label: "cname",
+        value: "cname"
+      },
+      search: true,
       overHidden: true,
-      index: 2
+      index: 1
     },
     {
-      label: "产品名称",
-      prop: "data",
-      search: true,
+      label: "产品分类",
+      prop: "goodsType",
       overHidden: true,
-      index: 3
+      index: 2
     },
     {
-      label: "库",
-      prop: "deliveringAmount",
+      label: "库",
+      prop: "storage",
       overHidden: true,
-      index: 5
+      index:3
     },
     {
       label: "期初库存",
-      prop: "deliveringAmount",
+      prop: "arrears",
       overHidden: true,
-      index: 6
+      index:4
     },
     {
       label: "库存数量",
-      prop: "deliveringAmount",
+      prop: "balance",
       overHidden: true,
       cell:true,
-      index: 7
+      index:5
     },
     {
       label: "库存预警值",
-      prop: "deliveringAmount",
+      prop: "lowerLimit",
       overHidden: true,
       width:120,
-      index: 8
+      index: 6
     },
     {
       label: "采购价",
       prop: "purchasePrice",
       overHidden: true,
-      index: 9
+      index: 7
     },
     {
       label: "成本均价",
       prop: "stockPrice",
       overHidden: true,
       cell:true,
-      index: 10
+      index: 8
     },
     {
       label: "单位",
-      prop: "sta",
+      prop: "unit",
+      type: "select",
+      filterable:true,
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
       overHidden: true,
       search: true,
       hide: true,
       showColumn: false,
-      index: 11
+      index: 9
     },
     {
       label: "备注",
-      prop: "deliveringAmount",
+      prop: "remarks",
       overHidden: true,
       search: true,
-      index: 12
+      index: 10
     },
     {
       label: "更新日期",
-      prop: "deliveringAmount",
+      prop: "updateTime",
       overHidden: true,
-      index: 13
+      index: 11
     },
     {
       label: "状态",
       prop: "status",
+      type: "select",
+      filterable:true,
+      dataType: "Number",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      dicData:[],
       overHidden: true,
       search: true,
       hide: true,
       showColumn: false,
-      index: 14
+      index: 12
     },
     {
       label: "产品标签",
-      prop: "b",
-      overHidden: true,
+      prop: "label",
+      type: 'checkbox',
+      dataType: "string",
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
       search: true,
+      multiple:true,
+      overHidden: true,
       hide: true,
       showColumn: false,
-      index: 15
+      index: 13
     }
   ]
 }

+ 14 - 3
src/views/product/detailsPage.vue

@@ -8,6 +8,12 @@
           </el-button>
         </div>
         <div class="add-customer-btn">
+          <el-button v-if="form.status == 1" size="small" @click="disabled(0)">
+            启用
+          </el-button>
+          <el-button v-if="form.status == 0" size="small" @click="disabled(1)">
+            禁用
+          </el-button>
           <el-button type="primary" size="small" @click="editCustomer">
             保存数据
           </el-button>
@@ -64,7 +70,7 @@
 </template>
 
 <script>
-import { getGoodstype, getDetails, goodsTypesubmit, getStoragetype, submit, itemRemove } from "@/api/basicData/product";
+import { getGoodstype, getDetails, goodsTypesubmit, getStoragetype, submit, itemRemove, disabled } from "@/api/basicData/product";
 import { optionList } from "./js/optionList";
 export default {
   name: "index",
@@ -102,7 +108,7 @@ export default {
             type: "select",
             props: {
               label: "dictValue",
-              value: "dictKey"
+              value: "dictValue"
             },
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
             span: 8,
@@ -223,7 +229,7 @@ export default {
       getStoragetype().then(res => {
         this.findObject(this.optionList.column, "storageId").dicData = res.data.data;
       });
-      this.$refs.crud.init();
+      // this.$refs.crud.init();
     },
     cellStyle() {
       return "padding:0;height:40px;";
@@ -257,6 +263,11 @@ export default {
         }
       });
     },
+    disabled(val) {
+      disabled({ id: this.form.id, status: val }).then(res => {
+        this.getDetail(this.detailData.id);
+      })
+    },
     saveGoodstype() {
       this.$refs["goodsType"].validate((valid, done) => {
         done();

+ 17 - 4
src/views/product/index.vue

@@ -15,7 +15,7 @@
         </template>
         <template slot-scope="{ row, index }" slot="menu">
           <el-tooltip class="item" effect="dark" content="删除" placement="top">
-            <i class="tradingIcon icon-del" @click.stop="rowDel(row, index)"/>
+            <i class="tradingIcon icon-del" @click.stop="rowDel(row, index)" v-if="row.status != 0" />
           </el-tooltip>
           <!-- <el-tooltip class="item" effect="dark" content="新建销售订单" placement="top">
             <i class="tradingIcon icon-add" />
@@ -48,7 +48,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList,remove} from "@/api/basicData/product";
+import { getList, remove, getAllgoods } from "@/api/basicData/product";
 export default {
   name: "index",
   data() {
@@ -83,11 +83,24 @@ export default {
       //   this.findObject(this.option.column, "cname").dicData = res.data.data;
       //   this.findObject(this.option.column, "ids").dicData = res.data.data;
       // })
+      // "/api/blade-system/dict-biz/dictionary?code=label",
+      this.getWorkDicts("label").then(res => {
+        this.findObject(this.option.column, "label").dicData = res.data.data;
+      });
+      this.getWorkDicts("unit").then(res => {
+        this.findObject(this.option.column, "unit").dicData = res.data.data;
+      });
+      this.getWorkDicts("goods_status").then(res => {
+        this.findObject(this.option.column, "status").dicData = res.data.data;
+      });
+      getAllgoods().then(res => {
+        this.findObject(this.option.column, "cname").dicData = res.data.data
+      });
       this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height -46;
+        this.option.height = this.option.height - 46;
       } else {
         this.option.height = this.option.height + 46;
       }
@@ -144,7 +157,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        remove({id:row.id}).then(res => {
+        remove({ id: row.id }).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",

+ 32 - 1
src/views/product/js/optionList.js

@@ -19,6 +19,13 @@ export const option = {
     {
       label: "商品名称",
       prop: "cname",
+      type: "select",
+      dicData: [],
+      filterable:true,
+      props: {
+        label: "cname",
+        value: "cname"
+      },
       search: true,
       overHidden: true,
       index: 1
@@ -32,6 +39,13 @@ export const option = {
     {
       label: "单位",
       prop: "unit",
+      type: "select",
+      filterable:true,
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
       search: true,
       overHidden: true,
       index: 4
@@ -51,7 +65,15 @@ export const option = {
     },
     {
       label: "状态",
-      prop: "remarks",
+      prop: "status",
+      type: "select",
+      filterable:true,
+      dataType: "Number",
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      dicData:[],
       search: true,
       hide: true,
       showColumn: false,
@@ -61,7 +83,15 @@ export const option = {
     {
       label: "标签",
       prop: "label",
+      type: 'checkbox',
+      dataType: "string",
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
       search: true,
+      multiple:true,
       hide: true,
       showColumn: false,
       overHidden: true,
@@ -90,6 +120,7 @@ export const optionList = {
         value: 'value'
       },
       dicData:[],
+      filterable:true,
       cell: true,
       overHidden: true
     },

+ 2 - 2
src/views/salesOrder/detailsPage.vue

@@ -99,7 +99,7 @@
 
 <script>
 import { optionList } from "./js/optionList";
-import { getDetails, submit, getCorpDetails, remove, getAllgoodstype } from "@/api/basicData/salesOrder";
+import { getDetails, submit, getCorpDetails, remove, getAllgoods } from "@/api/basicData/salesOrder";
 import feeInfo from "./components/feeInfo.vue";
 import { multiply, sum, subtract } from "@/util/calculate";
 export default {
@@ -341,7 +341,7 @@ export default {
       this.option.disabled = true;
     }
     this.getAllWorkDicts()
-    getAllgoodstype().then(res => {
+    getAllgoods().then(res => {
       this.goodsoptions = res.data.data
     });
   },

+ 2 - 5
src/views/salesOrder/index.vue

@@ -57,7 +57,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList, getCorpsAll, gainUser,getCorpType,getAllgoodstype } from "@/api/basicData/salesOrder";
+import { getList, getCorpsAll, gainUser,getCorpType,getAllgoods } from "@/api/basicData/salesOrder";
 export default {
   name: "index",
   data() {
@@ -157,16 +157,13 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      getCorpsAll().then(res => {
-        this.findObject(this.option.column, "corpId").dicData = res.data.data;
-      })
       gainUser().then(res => {
         this.findObject(this.option.column, "createUser").dicData = res.data.data;
       })
       getCorpType({ corpType: 'KH' }).then(res => {
         this.findObject(this.option.column, "corpType").dicData= res.data.data
       });
-      getAllgoodstype().then(res => {
+      getAllgoods().then(res => {
         this.findObject(this.option.column, "cname").dicData= res.data.data
       });
       this.$refs.crud.init();

+ 2 - 2
src/views/salesOrder/js/optionList.js

@@ -98,7 +98,7 @@ export const option = {
       filterable:true,
       props: {
         label: "cname",
-        value: "id"
+        value: "cname"
       },
       index: 11
     },
@@ -180,7 +180,7 @@ export const optionList = {
       type: "select",
       props: {
         label: "dictValue",
-        value: "dictKey"
+        value: "dictValue"
       },
       dicData:[],
       cell: true,

+ 6 - 0
src/views/statisticAnalysis/AmtAmount/index.vue

@@ -63,6 +63,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -330,6 +331,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(225), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;

+ 14 - 1
src/views/statisticAnalysis/brandProfit/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -95,6 +96,10 @@ export default {
           {
             name: "grossProfitRate",
             type: "sum"
+          },
+          {
+            name: "purchaseAmount",
+            type: "sum"
           }
         ],
         column: [
@@ -163,11 +168,13 @@ export default {
           {
             label: "毛利额(不含返利)",
             prop: "netGrossProfit",
+            width:140,
             overHidden: true,
           },
           {
             label: "毛利额(含返利)",
             prop: "grossProfit",
+            width:140,
             overHidden: true,
           },
           {
@@ -183,6 +190,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(229), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;
@@ -190,6 +202,7 @@ export default {
         this.findObject(this.option.column, "brand").dicData =
           res.data.data;
       })
+      this.$refs.crud.init();
       // gainUser().then(res => {
       //   this.findObject(this.option.column, "chargeMember").dicData =
       //     res.data.data;
@@ -279,7 +292,7 @@ export default {
       }
       window.open(
         `/api/blade-purchase-sales/exportOrder/brandProfitExport?${this.website.tokenHeader
-        }=${getToken()}&beginTime=${params.beginTime}&endTime=${params.endTime}&brand=${params.brand? params.brand : ''}`
+        }=${getToken()}&beginTime=${params.beginTime}&endTime=${params.endTime}&brand=${params.brand ? params.brand : ''}`
       );
     }
   }

+ 6 - 0
src/views/statisticAnalysis/customerDelivery/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -147,6 +148,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(226), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;

+ 10 - 0
src/views/statisticAnalysis/customerProfit/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -95,6 +96,10 @@ export default {
           {
             name: "grossProfitRate",
             type: "sum"
+          },
+          {
+            name: "purchaseAmount",
+            type: "sum"
           }
         ],
         column: [
@@ -180,6 +185,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(231), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;

+ 6 - 0
src/views/statisticAnalysis/salesmanDelivery/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -146,6 +147,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(227), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;

+ 11 - 1
src/views/statisticAnalysis/salesmanProfit/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -95,6 +96,10 @@ export default {
           {
             name: "grossProfitRate",
             type: "sum"
+          },
+          {
+            name: "purchaseAmount",
+            type: "sum"
           }
         ],
         column: [
@@ -180,6 +185,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(228), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;
@@ -276,7 +286,7 @@ export default {
       }
       window.open(
         `/api/blade-purchase-sales/exportOrder/salesmanProfitExport?${this.website.tokenHeader
-        }=${getToken()}&beginTime=${params.beginTime}&endTime=${params.endTime}&brand=${params.brand? params.brand : ''}`
+        }=${getToken()}&beginTime=${params.beginTime}&endTime=${params.endTime}&brand=${params.brand ? params.brand : ''}`
       );
     }
   }

+ 6 - 0
src/views/statisticAnalysis/specificationsDelivery/index.vue

@@ -62,6 +62,7 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        summaryText: "合计",
         showSummary: true,
         sumColumnList: [
           {
@@ -157,6 +158,11 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(230), this.optionBack);
     this.getAllWorkDicts()
   },
+  activated() {
+   this.$nextTick(() => {
+      this.$refs.crud.refreshTable();
+    });
+  },
   methods: {
     getAllWorkDicts() {
       this.option.height = window.innerHeight - 210;