瀏覽代碼

Finish Hotfix-mo-174

莫绍宝 3 年之前
父節點
當前提交
e58a613401

+ 44 - 11
src/views/finance/standbook_list.vue

@@ -4,8 +4,9 @@
       <el-page-header @back="goBack"> </el-page-header>
     </div>
 
-    <span v-else>台账</span>
-    <el-divider></el-divider>
+    <!-- <span v-else>台账</span>
+    <el-divider></el-divider> -->
+
     <!-- <el-radio-group v-model="mainId" size="">
       <el-radio-button
         v-for="(v, i) in dictList"
@@ -21,8 +22,8 @@
     </el-radio-group>
     <h1></h1>
     <!-- 筛选条件 -->
-    <div>
-      <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
+    <div class="screen-container">
+      <el-form ref="searchForm" :model="searchForm" label-width="90px" size="mini" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商名称" prop="customerId">
@@ -57,12 +58,19 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-        <el-col :xs="24" :sm="12" :lg="6">
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商编码" prop="customerNumber">
               <el-input v-model="searchForm.customerNumber" placeholder="请输入经销商编码"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="12">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据类型" prop="billType">
+              <el-select :disabled="isDisabled" class="selectStyle" v-model="searchForm.billType" placeholder="请选择" filterable>
+                <el-option v-for="(v, i) in typeList" :key="i" :label="v" :value="v"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="" class="fr">
               <el-button size="mini" @click="resetFn">清空</el-button>
               <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
@@ -342,7 +350,8 @@ export default {
         billNo: "",
         startTime: "",
         endTime: "",
-        customerNumber:''
+        customerNumber:'',
+        billType: '',
       }, //搜索表单
       listLoading: false, // 列表加载loading
 
@@ -351,11 +360,35 @@ export default {
       isDisabled: false,
       isCustomerList: {
         customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        customerName: JSON.parse(localStorage.getItem("supply_user"))
-          .customerName,
-        customerNumber: JSON.parse(localStorage.getItem("supply_user"))
-          .customerNumber,
+        customerName: JSON.parse(localStorage.getItem("supply_user")).customerName,
+        customerNumber: JSON.parse(localStorage.getItem("supply_user")).customerNumber,
       },
+      typeList: [
+        '收款单',
+        '退款单',
+        '返利单',
+        '零售单扣款',
+        '申请发货单',
+        '零售订单退款',
+        '退货单退单',
+        '家用工程订单扣款-审批',
+        '家用工程订单押金',
+        '家用工程订单退押金',
+        '家用工程订单返利退款-退订',
+        '零售单返利扣款',
+        '零售单返利退款',
+        '直接调拨单销售退库单订单返利退款-退货单',
+        '直接调拨单销售退库单订单退款-退货单',
+        '商用工程订单扣款-审批',
+        '商用工程订单返利扣款-审批',
+        '商用工程申请发货订单返利退款-退货单',
+        '商用工程发货申请发货订单退款-退货单',
+        '商用工程销售退库单单返利退款-退货单',
+        '商用工程发货销售退库单订单退款-退货单',
+        '家用工程订单退款-弃审',
+        '家用工程订单返利扣款-审批',
+        '家用工程订单返利退款-弃审'
+      ]
     };
   },
   computed: {

+ 21 - 22
src/views/stock/stock_list.vue

@@ -6,7 +6,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="仓库" prop="warehouse">
-              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" @change="changeWarehouse" clearable   multiple >
+              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" @change="changeWarehouse" clearable multiple collapse-tags>
                 <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
               </el-select>
             </el-form-item>
@@ -27,7 +27,7 @@
           </el-col> -->
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="产品类别" prop="categoryId">
-              <el-select v-model="screenForm.categoryId" placeholder="请选择产品类别" clearable>
+              <el-select v-model="screenForm.categoryId" placeholder="请选择产品类别" filterable clearable multiple collapse-tags>
                 <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
@@ -144,7 +144,7 @@ export default {
         goodsCode: '',
         model: '',
         type: '',
-        categoryId: '',
+        categoryId: [],
       },
       warehouseList: [],
       positionList: [],
@@ -155,17 +155,17 @@ export default {
 
   computed: {
     exParams() {
-        const correspondNameS = this.fliterData()
+      const correspondNameS = this.fliterData()
       return {
-         correspondId:  this.screenForm.warehouse.join(),
-        correspondNameS:correspondNameS.join('/'),
+        correspondId: this.screenForm.warehouse.join(),
+        correspondNameS: correspondNameS.join('/'),
         stockId: this.screenForm.position,
         materialName: this.screenForm.goodsName,
         materialNumber: this.screenForm.goodsCode,
         materialOldNumber: this.screenForm.goodsNum,
         specification: this.screenForm.model,
         mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.categoryId,
+        categoryId: this.screenForm.categoryId.join(','),
       }
     },
   },
@@ -229,19 +229,19 @@ export default {
     // 查询列表
     getList() {
       this.listLoading = true;
-        const correspondNameS = this.fliterData()
+      const correspondNameS = this.fliterData()
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        correspondId:  this.screenForm.warehouse.join(),
-        correspondNameS:correspondNameS.join('/'),
+        correspondId: this.screenForm.warehouse.join(),
+        correspondNameS: correspondNameS.join('/'),
         stockId: this.screenForm.position,
         materialName: this.screenForm.goodsName,
         materialNumber: this.screenForm.goodsCode,
         materialOldNumber: this.screenForm.goodsNum,
         specification: this.screenForm.model,
         mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.categoryId,
+        categoryId: this.screenForm.categoryId.join(','),
       };
       getStockList(params).then((res) => {
         this.dataList = res.data.records;
@@ -276,17 +276,16 @@ export default {
       this.getList();
     },
     fliterData(){
-           const correspondNameS = []
-        if( this.screenForm.warehouse &&  this.screenForm.warehouse.length)
-         this.screenForm.warehouse.forEach(e=>{
-           this.warehouseList.filter(k=>{
-               if(e === k.id){
-                correspondNameS.push(k.name)
-              }
-           })
-        })
-
-        return correspondNameS
+      const correspondNameS = []
+      if( this.screenForm.warehouse &&  this.screenForm.warehouse.length)
+        this.screenForm.warehouse.forEach(e=>{
+          this.warehouseList.filter(k=>{
+              if(e === k.id){
+              correspondNameS.push(k.name)
+            }
+          })
+      })
+      return correspondNameS
     }
   }
 }

+ 30 - 14
src/views/supply/engin/components/engin_examine.vue

@@ -172,37 +172,37 @@
       show-summary
             :summary-method="$getSummaries">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
+        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.specification" size="small"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.price" size="small" type="number"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.qty" size="small" type="number"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="订单金额" min-width="100" prop="totalAmount" show-overflow-tooltip>
+        <el-table-column align="right" label="订单金额" min-width="100" prop="compute_amount" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{(scope.row.price || 0) * (scope.row.qty || 0)}}
+            {{scope.row.compute_amount | numToFixed}}
           </template>
         </el-table-column>
-        <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
+        <el-table-column align="left" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
             <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
@@ -413,9 +413,25 @@ export default {
       salesTypeList:[]
     }
   },
+
   computed:{
-...mapGetters(['isCustomer']),
+    ...mapGetters(['isCustomer']),
   },
+
+  watch: {
+    goodsList: {
+      handler(newValue, oldValue) {
+        if(newValue && newValue.length) {
+          newValue.forEach((item, index) => {
+            this.goodsList[index].compute_amount = item.price * item.qty;
+          })
+        }
+      },
+      immediate: true,
+      deep: true
+    }
+  },
+
   created() {
     this.getDetail();
     this.getTypeList();
@@ -435,7 +451,7 @@ export default {
         this.detailData = res.data;
         res.data.items.forEach(item => {
           item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty'];
-            item.sums2 = ['totalAmount', 'price'];
+            item.sums2 = ['compute_amount', 'price'];
         })
         this.goodsList = res.data.items;
       })

+ 25 - 17
src/views/supply/sales/sales_list.vue

@@ -81,11 +81,10 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="仓库名称" prop="warehouse">
-                <el-input
-                  v-model="screenForm.warehouse"
-                  placeholder="请输入仓库名称"
-                ></el-input>
+              <el-form-item label="仓库" prop="warehouse">
+                <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" filterable clearable multiple collapse-tags style="width: 100%">
+                  <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -381,7 +380,7 @@
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
+            :page-sizes="[10, 20, 30, 50, 100]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal"
@@ -421,7 +420,7 @@ import {
   examineBatch,
   examineJudge,
   getList,
-  updateNum,
+  getWarehouseList,
 } from "@/api/supply/sales";
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
@@ -464,13 +463,12 @@ export default {
         chName: "",
         chNum: "",
         model: "",
-        warehouse: "",
+        warehouse: [],
         date: "",
         status: "",
         mainOrderId: "",
         approval:'',
-        id:''
-
+        id:'',
       },
       statusList: [
         { label: "已保存", value: "SAVE" },
@@ -478,6 +476,7 @@ export default {
         { label: "审核通过", value: "OK" },
         // { label: '审核驳回', value: 'FAIL' },,
       ],
+      warehouseList: [],
       centerDialogVisible:false,
       cid:'',
       queryItem: {},
@@ -522,7 +521,7 @@ export default {
         materialName: this.screenForm.chName,
         materialNumber: this.screenForm.chNum,
         specification: this.screenForm.model,
-        correspondName: this.screenForm.warehouse,
+        correspondId: this.screenForm.warehouse.join(','),
         startTime: this.screenForm.date ? this.screenForm.date[0] : "",
         endTime: this.screenForm.date ? this.screenForm.date[1] : "",
         approvalStartTime: this.screenForm.approval ? this.screenForm.approval[0] : "",
@@ -550,6 +549,7 @@ export default {
   },
 
   created() {
+    this.getWarehouseList();
     this.getList();
   },
 
@@ -557,7 +557,6 @@ export default {
     // 查询列表
     getList() {
       this.listLoading = true;
-
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
@@ -568,7 +567,7 @@ export default {
         materialName: this.screenForm.chName,
         materialNumber: this.screenForm.chNum,
         specification: this.screenForm.model,
-        correspondName: this.screenForm.warehouse,
+        correspondId: this.screenForm.warehouse.join(','),
         startTime: this.screenForm.date ? this.screenForm.date[0] : "",
         endTime: this.screenForm.date ? this.screenForm.date[1] : "",
          approvalStartTime: this.screenForm.approval ? this.screenForm.approval[0] : "",
@@ -587,13 +586,22 @@ export default {
       });
     },
 
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      })
+    },
 
     updateReceipt() {
 
-    if (!this.value1) {
-      this.$errorMsg('请选择时间')
-      return
-    }
+      if (!this.value1) {
+        this.$errorMsg('请选择时间')
+        return
+      }
       // updateReceipt({
       // startTime:this.value1[0],
       // endTime:this.value1[1]