simple hace 5 años
padre
commit
f3960facfd

+ 1 - 1
src/page/baseInfo/components/supply/supplyAdd.vue

@@ -81,7 +81,7 @@
           </Col>
           <Col span="4" class-name="tables">分管采购员</Col>
           <Col span="4" class-name="tables">
-            <Select clearable v-model="form.fgcgy" style="width: 95%">
+            <Select clearable filterable v-model="form.fgcgy" style="width: 95%">
               <Option
                 v-for="item in fgcgyList"
                 :value="item.userId"

+ 1 - 1
src/page/baseInfo/components/supply/supplyEdit.vue

@@ -95,7 +95,7 @@
           </Col>
           <Col span="4" class-name="tables">分管采购员</Col>
           <Col span="4" class-name="tables">
-            <Select clearable v-if="editing" v-model="form.fgcgy" style="width: 95%">
+            <Select clearable filterable v-if="editing" v-model="form.fgcgy" style="width: 95%">
               <Option
                 v-for="item in fgcgyList"
                 :value="item.userId"

+ 6 - 6
src/page/baseInfo/supply.vue

@@ -53,7 +53,7 @@
       </Row>
       <Row :gutter="10" style="margin-bottom: 10px">
         <Col span="4">
-          <Select clearable v-model="searchForm.fgcgy" placeholder="分管采购员">
+          <Select clearable filterable v-model="searchForm.fgcgy" placeholder="分管采购员">
             <Option
               v-for="item in fgcgyList"
               :value="item.userId"
@@ -181,17 +181,17 @@ export default {
         {
           title: "供应商简称",
           key: "gpAbbreviation",
-          tooltip: "true",
+          tooltip: "true"
         },
         {
           title: "联系人",
           key: "gpLinker",
-          tooltip: "true",
+          tooltip: "true"
         },
         {
           title: "联系电话",
           key: "gpLinkTell",
-          tooltip: "true",
+          tooltip: "true"
         },
         // {
         //   title: "供应商分类",
@@ -211,12 +211,12 @@ export default {
         {
           title: "分管采购员",
           key: "gpBuyerName",
-          tooltip: "true",
+          tooltip: "true"
         },
         {
           title: "启用状态",
           slot: "gpEnabledState",
-          tooltip: "true",
+          tooltip: "true"
         },
         {
           title: "创建或同步时间",

+ 20 - 8
src/page/purchase/components/balance/balanceAdd.vue

@@ -96,7 +96,6 @@
           </Col>
           <Col span="4" class-name="tables">
             <Select
-              v-if="!mrzhShow"
               :disabled="form.spzt != '1' && form.spzt != '4'"
               v-model="form.gyszh"
               placeholder="请选择供应商账号"
@@ -110,7 +109,6 @@
                 :key="item.gpbcId"
               >{{ item.unionpay }}</Option>
             </Select>
-            <span v-else>{{ form.zh }}</span>
           </Col>
           <Col span="4" class-name="tables">
             开户行
@@ -436,15 +434,15 @@ export default {
       goodProviderBankCardPageList(postData, pageStr).then(res => {
         if (res.status == 200) {
           let arr = res.data.records;
+          arr = arr.sort(
+            (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
+          );
+          this.zhList = arr;
           if (arr.filter(a => a.gpbcDefault == "1").length > 0) {
-            this.mrzhShow = true;
+            this.form.gyszh = arr.filter(a => a.gpbcDefault == "1")[0].gpbcId;
             this.form.zh = arr.filter(a => a.gpbcDefault == "1")[0].unionpay;
             this.form.khh = arr.filter(a => a.gpbcDefault == "1")[0].bank;
           } else {
-            arr = arr.sort(
-              (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
-            );
-            this.zhList = arr;
             this.form.gyszh = arr[0].gpbcId;
             this.zhChange(arr[0].gpbcId);
           }
@@ -510,7 +508,21 @@ export default {
           }
           this.tableData = data.detailList;
           this.requestId = data.requestId;
-          this.gysChange(data.supplierId);
+
+          let pStr = `10000/1?gpId=${data.supplierId}`;
+          let pData = {
+            gpId: data.supplierId
+          };
+          goodProviderBankCardPageList(pData, pStr).then(res => {
+            if (res.status == 200) {
+              let arr = res.data.records;
+              arr = arr.sort(
+                (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
+              );
+              this.zhList = arr;
+            }
+          });
+
           let postData = {
             areaId: this.form.glqy,
             userId: localStorage.user_id

+ 8 - 4
src/page/purchase/components/order/orderAdd.vue

@@ -126,7 +126,10 @@
             ></DatePicker>
           </Col>
           <Col span="4" class-name="tables">交货地点</Col>
-          <Col span="4" class-name="tables">{{ form.jhdd }}</Col>
+          <Col span="4" class-name="tables">
+            <span style="color: gray" v-if="orderType == 'add'">系统自动生成,不可编辑</span>
+            <span v-else>{{ form.jhdd }}</span>
+          </Col>
           <Col span="4" class-name="tables">
             收货人
             <span class="mustSpan">*</span>
@@ -551,9 +554,9 @@ export default {
         this.$Message.error(res.message);
       }
     });
-    selectGoodProviderSelectionList({isCheck: true}).then(res => {
+    selectGoodProviderSelectionList({ isCheck: true }).then(res => {
       this.gysList = res.data;
-    })
+    });
   },
   methods: {
     //批量设置弹窗
@@ -735,7 +738,7 @@ export default {
         gpId: this.form.gys, //供应商ID
         gpNmae: gpName.length ? gpName[0].gpName : "", //供应商Name
         orderId: this.orderId,
-        deleteId: this.deleteIds.join(","),
+        // deleteId: this.deleteIds.join(","),
         attachmentList: this.form.filesList,
         detailList: this.tableData
       };
@@ -902,6 +905,7 @@ export default {
       this.form.cgrlxfs = "";
       this.form.xdrq = "";
       this.form.jhsj = "";
+      this.form.jhdd = "";
       this.form.shr = "";
       this.form.shrlxfs = "";
       this.form.gys = "";

+ 20 - 1
src/page/purchase/components/plan/planAdd.vue

@@ -97,6 +97,7 @@
           <Col span="4" class-name="tables">
             <Select
               v-model="form.fgcgy"
+              filterable
               :disabled="form.spzt == '2' || form.spzt == '1'"
               style="width: 95%"
             >
@@ -256,10 +257,19 @@
               style="width: 95%"
             />
           </template>
+          <template
+            slot-scope="{ row, index }"
+            slot="isCancel"
+          >{{ row.isCancel == '0' ? '未取消' : '已取消' }}</template>
           <template slot-scope="{ row, index }" slot="cz">
-            <div v-if="form.spzt != '1' && (form.status = '1' || form.status == '2')">
+            <div
+              v-if="form.spzt != '1' && form.spzt !='2' && (form.status = '1' || form.status == '2')"
+            >
               <a href="javascript:;" @click="deleteRow(index)">删除</a>
             </div>
+            <div v-if="row.isCancel == '0' && form.spzt == '2'">
+              <a href="javascript:;" @click="cancelRow(row, index)">取消</a>
+            </div>
           </template>
         </Table>
       </Card>
@@ -444,6 +454,12 @@ export default {
           tooltip: "true",
           width: 150
         },
+        {
+          title: "状态",
+          slot: "isCancel",
+          tooltip: "true",
+          width: 100
+        },
         {
           title: "操作",
           slot: "cz",
@@ -727,6 +743,9 @@ export default {
     deleteRow(index) {
       this.tableData.splice(index, 1);
     },
+    cancelRow(row, index) {
+      this.tableData[index].isCancel = 1;
+    },
     //明细弹窗
     addMxShow() {
       this.contentShow = false;

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

@@ -50,7 +50,7 @@
           ></DatePicker>
         </Col>
         <Col span="4">
-          <Select clearable v-model="searchForm.fgcgy" placeholder="分管采购员">
+          <Select clearable filterable v-model="searchForm.fgcgy" placeholder="分管采购员">
             <Option
               v-for="item in fgcgyList"
               :value="item.userId"

+ 139 - 2
src/page/purchase/purchasePool.vue

@@ -64,6 +64,94 @@
       :gysList="gysList"
       v-show="!contentShow"
     />
+    <Modal v-model="poolModalShow" title="新增采购订单" :width="700">
+      <Row class="mainCont">
+        <Col span="4" class-name="tables">单据类型</Col>
+        <Col span="4" class-name="tables">
+          <Select clearable v-model="addForm.djlx" style="width: 95%">
+            <Option
+              v-for="item in djlxList"
+              :value="item.value"
+              :key="item.value"
+            >{{ item.label }}</Option>
+          </Select>
+        </Col>
+
+        <Col span="4" class-name="tables">采购人</Col>
+        <Col span="4" class-name="tables">{{ addForm.cgr }}</Col>
+        <Col span="4" class-name="tables">采购人联系方式</Col>
+        <Col span="4" class-name="tables">
+          <Input
+            v-model="addForm.cgrlxfs"
+            placeholder="请输入"
+            style="width: 95%"
+          />
+        </Col>
+        <Col span="4" class-name="tables">下单日期</Col>
+        <Col span="4" class-name="tables">
+          <DatePicker
+            style="width: 95%"
+            format="yyyy-MM-dd HH:mm:ss"
+            :value="addForm.xdrq"
+            @on-change="addForm.xdrq=$event"
+            type="datetime"
+            placeholder="请选择"
+          ></DatePicker>
+        </Col>
+        <Col span="4" class-name="tables">交货时间</Col>
+        <Col span="4" class-name="tables">
+          <DatePicker
+            style="width: 95%"
+            format="yyyy-MM-dd"
+            :value="addForm.jhsj"
+            :options="jhsjOptions"
+            @on-change="addForm.jhsj=$event"
+            type="date"
+            placeholder="请选择"
+          ></DatePicker>
+        </Col>
+        <Col span="4" class-name="tables">收货人</Col>
+        <Col span="4" class-name="tables">
+          <Input
+            v-model="addForm.shr"
+            placeholder="请输入"
+            style="width: 95%"
+          />
+        </Col>
+        <Col span="4" class-name="tables">收货人联系方式</Col>
+        <Col span="4" class-name="tables">
+          <Input
+            v-model="addForm.shrlxfs"
+            placeholder="请输入"
+            style="width: 95%"
+          />
+        </Col>
+        <Col span="4" class-name="tables">供应商</Col>
+        <Col span="12" class-name="tables">
+          <Select
+            clearable
+            v-model="addForm.gys"
+            @on-change="gysChange"
+            filterable
+            style="width: 95%"
+          >
+            <Option
+              v-for="item in gysList"
+              :value="item.gpId"
+              :key="item.gpId"
+            >{{ item.gpName }}</Option>
+          </Select>
+        </Col>
+        <Col span="4" class-name="tables">供方负责人</Col>
+        <Col span="4" class-name="tables">{{ addForm.gffzr }}</Col>
+        <Col span="4" class-name="tables">供应商联系电话</Col>
+        <Col span="4" class-name="tables">{{ addForm.gyslxdh }}</Col>
+      </Row>
+      <div slot="footer">
+        <Button @click="poolModalCancel">取消</Button>
+        <Button type="primary" @click="poolModalOk">确定</Button>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -74,13 +162,15 @@ import {
   getAreaList,
   getProjectList,
   tbiGoodsCategoryList,
-  selectGoodProviderSelectionList
+  selectGoodProviderSelectionList,
+  getLabelByCode4Purchase
 } from "@/service/getData";
 export default {
   components: { poolAdd },
   data() {
     return {
       contentShow: true,
+      poolModalShow: false,
       //  自适应尺寸↓
       resizeHeight: 100,
       resizeWidth: 100,
@@ -94,16 +184,34 @@ export default {
         sgjh: "",
         sqr: ""
       },
+      addForm: {
+        djlx: "",
+        cgr: "",
+        cgrlxfs: "",
+        xdrq: "",
+        jhsj: "",
+        shr: "",
+        shrlxfs: "",
+        gys: "",
+        gffzr: "",
+        gyslxdh: ""
+      },
       ssqyList: [],
       ssxmList: [],
       gysList: [],
       allFlList: [],
       yjflList: [],
       ejflList: [],
+      djlxList: [],
       // 表格参数
       tableLoading: false,
       pageTotal: 0,
       pageNum: 1,
+      jhsjOptions: {
+        disabledDate: date => {
+          return date && date.valueOf() < new Date(this.addForm.xdrq);
+        }
+      },
       tableColumn: [
         {
           type: "selection",
@@ -214,6 +322,13 @@ export default {
     selectGoodProviderSelectionList().then(res => {
       this.gysList = res.data;
     });
+    getLabelByCode4Purchase({ dictCode: "billType" }).then(res => {
+      if (res.status == 200) {
+        this.djlxList = res.data;
+      } else {
+        this.$Message.error(res.message);
+      }
+    });
     tbiGoodsCategoryList().then(res => {
       this.allFlList = res.data.data;
       let arr = [];
@@ -256,6 +371,28 @@ export default {
       this.contentShow = true;
       // this.$router.push("/index/purchaseOrder");
     },
+    gysChange(val) {
+      this.gysGo = true;
+      let gys = this.gysList.filter(a => a.gpId == val);
+      if (gys.length > 0) {
+        let sup = gys[0];
+        if (!sup.gpcName || !sup.gpcPhone) {
+          this.$Message.error(
+            "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
+          );
+          this.gysGo = false;
+          this.addForm.gffzr = "";
+          this.addForm.gyslxdh = "";
+          return false;
+        }
+        this.addForm.gffzr = sup.gpcName;
+        this.addForm.gyslxdh = sup.gpcPhone;
+        // bank开户行   unionpay银行账号
+      }
+    },
+    //批量采购弹窗
+    poolModalCancel() {},
+    poolModalOk() {},
     //批量采购
     plcg() {
       let project = "";
@@ -347,7 +484,7 @@ export default {
 
 <style lang="scss" scoped>
 .mainCont .tables {
-  height: 50px;
+  min-height: 50px;
   border-right: 1px solid #e4e4e4;
   border-bottom: 1px solid #e4e4e4;
   display: flex;