Bläddra i källkod

Signed-off-by: liuboyan <632697560@qq.com>
bug

liuboyan 4 år sedan
förälder
incheckning
27381508a9

+ 5 - 5
src/assets/css/common.scss

@@ -49,8 +49,8 @@ html,body{
     width: 100%;
     //background-color: #F5F5F5;
 }
-
-/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
+/*
+!*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*!
 ::-webkit-scrollbar
 {
     width:8px;
@@ -58,7 +58,7 @@ html,body{
     background-color: #F5F5F5;
 }
 
-/*定义滚动条轨道 内阴影+圆角*/
+!*定义滚动条轨道 内阴影+圆角*!
 ::-webkit-scrollbar-track
 {
     -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
@@ -66,13 +66,13 @@ html,body{
     background-color: #fff;
 }
 
-/*定义滑块 内阴影+圆角*/
+!*定义滑块 内阴影+圆角*!
 ::-webkit-scrollbar-thumb
 {
     border-radius:5px;
     -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.1);
     background-color: #dfdfdf;
-}
+}*/
 
 
 

+ 6 - 2
src/page/purchase/components/balance/balanceMxAdd.vue

@@ -248,10 +248,14 @@ export default {
     addMx() {
       console.log(this.tableSelect);
       console.log(this.orderIds);
+      let orderIds = this.orderIds. concat([])
       for (let item in this.tableSelect) {
-        this.orderIds.push(this.tableSelect[item].orderId);
+        orderIds.push(this.tableSelect[item].orderId);
       }
-      let arr = new Set(this.orderIds);
+      if (orderIds.length == 0){
+        this.$Message.error("请选择至少一条入库单");
+      }
+      let arr = new Set(orderIds);
       let tArr = [...arr];
       checkSettlementInvoiceTitle(tArr).then((res) => {
         if (res.status == 200) {

+ 1 - 1
src/page/purchase/components/order/orderAdd.vue

@@ -416,7 +416,7 @@
             />
           </template>
           <template slot-scope="{ row, index }" slot="isCancel">{{
-            row.isCancel == "0" ? "有效" : "已取消"
+            row.isCancel == "0" ? "有效" : (row.isCancel == 1 ? '"已取消"' : '--')
           }}</template>
           <template slot-scope="{ row, index }" slot="cz">
             <div v-if="form.spzt == '1' || form.spzt == '4'">

+ 40 - 17
src/page/purchase/components/order/orderMxAdd.vue

@@ -6,7 +6,7 @@
         <Button @click="goBack">返回</Button>
       </div>
       <Row :gutter="10" style="margin-bottom: 10px">
-        <Col span="4">
+        <Col span="6">
           <Select
             clearable
             v-model="searchForm.ck"
@@ -21,7 +21,7 @@
             >
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Select
             clearable
             v-model="searchForm.yjfl"
@@ -36,7 +36,7 @@
             >
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Select clearable v-model="searchForm.ejfl" placeholder="二级分类">
             <Option
               v-for="item in ejflList"
@@ -46,10 +46,26 @@
             >
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Input v-model="searchForm.wlmc" placeholder="物料编码或名称" />
         </Col>
-        <Col span="4">
+      </Row>
+      <Row :gutter="10" style="margin-bottom: 10px">
+        <Col span="6">
+          <Select clearable v-model="searchForm.type" placeholder="计划类型">
+            <Option v-for="item in jhlxList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+          </Select>
+        </Col>
+        <Col span="6">
+          <DatePicker
+            format="yyyy年MM月"
+            :value="searchForm.applyMonth"
+            @on-change="searchForm.applyMonth=$event"
+            type="month"
+            placeholder="计划月份"
+          ></DatePicker>
+        </Col>
+        <Col span="6">
           <Select
             clearable
             filterable
@@ -60,12 +76,11 @@
               v-for="item in fgcgyList"
               :value="item.userId"
               :key="item.userId"
-              >{{ item.userName }}</Option
+            >{{ item.userName }}</Option
             >
           </Select>
-          <!--          <Input v-model="searchForm.applicantName" placeholder="申请人名称" />-->
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Button
             type="primary"
             style="width: 80px"
@@ -73,7 +88,7 @@
               pageNum = 1;
               getTableData();
             "
-            >查询</Button
+          >查询</Button
           >
           <Button type="primary" @click="plAdd">批量添加</Button>
         </Col>
@@ -142,12 +157,18 @@ export default {
       //表格查询内容
       searchForm: {
         ck: "",
+        type: "",
+        applyMonth: "",
         yjfl: "", //一级分类
         ejfl: "", // 二级分类
         wlmc: "", //物料编码或名称
         applicantName: "", //物料编码或名称
         purchaserId: "", //物料编码或名称
       },
+      jhlxList: [
+        { label: "计划性申购", value: 1 },
+        { label: "临时申购", value: 2 },
+      ],
       ckList: [],
       allFlList: [],
       yjflList: [],
@@ -194,13 +215,13 @@ export default {
           width: 120,
           resizable: true,
         },
-        {
-          title: "品牌",
-          key: "brandName",
-          tooltip: true,
-          width: 120,
-          resizable: true,
-        },
+        // {
+        //   title: "品牌",
+        //   key: "brandName",
+        //   tooltip: true,
+        //   width: 120,
+        //   resizable: true,
+        // },
         {
           title: "规格型号",
           key: "specs",
@@ -293,6 +314,8 @@ export default {
       let postData = {
         page: this.pageNum,
         pageSize: 10,
+        type: this.searchForm.type,
+        applyMonth: this.searchForm.applyMonth,
         firstClassId: this.searchForm.yjfl,
         secondClassId: this.searchForm.ejfl,
         areaIds: this.areaId.split(",")[0],
@@ -354,7 +377,7 @@ export default {
     //批量添加物料
     plAdd() {
       this.getSelectNode();
-
+      this.tableSelect = []
       for (let key in this.tableSelectAll) {
         this.tableSelect = this.tableSelect.concat(this.tableSelectAll[key]);
       }

+ 61 - 7
src/page/purchase/components/pool/poolMxAdd.vue

@@ -6,25 +6,56 @@
         <Button @click="$emit('return')">返回</Button>
       </div>
       <Row :gutter="10" style="margin-bottom: 10px">
-        <Col span="4">
+        <Col span="6">
           <Select clearable v-model="searchForm.ck" :disabled="ckLock" placeholder="仓库名">
             <Option v-for="item in ckList" :value="item.twId" :key="item.twId">{{ item.twName }}</Option>
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Select clearable v-model="searchForm.yjfl" placeholder="一级分类" @on-change="yjflChange">
             <Option v-for="item in yjflList" :value="item.gcId" :key="item.gcId">{{ item.gcName }}</Option>
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Select clearable v-model="searchForm.ejfl" placeholder="二级分类">
             <Option v-for="item in ejflList" :value="item.gcId" :key="item.gcId">{{ item.gcName }}</Option>
           </Select>
         </Col>
-        <Col span="4">
+        <Col span="6">
           <Input v-model="searchForm.wlmc" placeholder="物料编码或名称" />
         </Col>
-        <Col span="8">
+      </Row>
+      <Row :gutter="10" style="margin-bottom: 10px">
+        <Col span="6">
+          <Select clearable v-model="searchForm.type" placeholder="计划类型">
+            <Option v-for="item in jhlxList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+          </Select>
+        </Col>
+        <Col span="6">
+          <DatePicker
+            format="yyyy年MM月"
+            :value="searchForm.applyMonth"
+            @on-change="searchForm.applyMonth=$event"
+            type="month"
+            placeholder="计划月份"
+          ></DatePicker>
+        </Col>
+        <Col span="6">
+          <Select
+            clearable
+            filterable
+            v-model="searchForm.purchaserId"
+            placeholder="分管采购员"
+          >
+            <Option
+              v-for="item in fgcgyList"
+              :value="item.userId"
+              :key="item.userId"
+            >{{ item.userName }}</Option
+            >
+          </Select>
+        </Col>
+        <Col span="6">
           <Button type="primary" style="width: 80px" @click="getTableData">查询</Button>
           <Button type="primary" @click="plAdd">批量添加</Button>
         </Col>
@@ -60,7 +91,8 @@ import {
   queryPurchasePoolList,
   tbiGoodsCategoryList,
   warehouseList,
-  getMaterialPrice
+  getMaterialPrice,
+  getJobList,
 } from "@/service/getData";
 export default {
   name: "poolMxAdd",
@@ -89,16 +121,24 @@ export default {
       //表格查询内容
       searchForm: {
         ck: "",
+        type: "",
+        applyMonth: "",
         yjfl: "", //一级分类
         ejfl: "", // 二级分类
-        wlmc: "" //物料编码或名称
+        wlmc: "", //物料编码或名称
+        purchaserId: ''
       },
       ckList: [],
+      jhlxList: [
+        { label: "计划性申购", value: 1 },
+        { label: "临时申购", value: 2 },
+      ],
       allFlList: [],
       yjflList: [],
       ejflList: [],
       jldwList: [],
       wllxList: [],
+      fgcgyList: [],
       //   表格参数
       tableLoading: false,
       pageTotal: 0,
@@ -207,6 +247,18 @@ export default {
         }
       }
     });
+    getJobList().then((res) => {
+      if (res.status == 200) {
+        this.fgcgyList = res.data;
+        if (
+          res.data.filter((site) => site.userId == localStorage.user_id).length
+        ) {
+          this.searchForm.purchaserId = localStorage.user_id;
+        }
+      } else {
+        this.$Message.error("获取分管采购员列表失败!");
+      }
+    });
   },
   methods: {
     //列表方法
@@ -214,6 +266,8 @@ export default {
       let postData = {
         page: this.pageNum,
         pageSize: 10,
+        type: this.searchForm.type,
+        applyMonth: this.searchForm.applyMonth,
         firstClassId: this.searchForm.yjfl,
         secondClassId: this.searchForm.ejfl,
         areaIds: this.areaId.split(",")[0],

+ 8 - 8
src/page/purchase/purchaseOrder.vue

@@ -109,7 +109,7 @@
         <Col span="4">
           <Input
             v-model="searchForm.title"
-            placeholder="订购编号/标题/申购单号/物料名称"
+            placeholder="标题/申购单号/物料名称"
           />
         </Col>
         <Col span="4">
@@ -332,13 +332,13 @@ export default {
           width: 200,
           resizable: true,
         },
-        {
-          title: "订购编号",
-          key: "orderCode",
-          tooltip: true,
-          width: 200,
-          resizable: true,
-        },
+        // {
+        //   title: "订购编号",
+        //   key: "orderCode",
+        //   tooltip: true,
+        //   width: 200,
+        //   resizable: true,
+        // },
         {
           title: "标题",
           key: "title",

+ 1 - 1
src/page/purchase/purchasePool.vue

@@ -428,7 +428,6 @@ export default {
   created() {
     // this.searchForm.applicantName = localStorage.user_name
     // this.searchForm.purchaserId = localStorage.user_id
-    this.getTableData();
     this.getUserAuth();
     getAreaList(localStorage.user_id).then((res) => {
       this.ssqyList = res.items;
@@ -465,6 +464,7 @@ export default {
         if (res.data.filter(site => site.userId == localStorage.user_id).length){
           this.searchForm.purchaserId = localStorage.user_id
         }
+        this.getTableData();
       } else {
         this.$Message.error("获取分管采购员列表失败!");
       }