Browse Source

Merge branch 'live' into edit

戴艳蓉 3 years ago
parent
commit
27fa8e17eb

+ 2 - 2
src/apis/service/purchaseIn/purchaseDiffOrder/index.js

@@ -7,9 +7,9 @@ export default {
   // 删除
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
+  list: (data, params) => http(api + "cgddifflist", data, "post", params),
   // 详情
   // 详情
-  detail: (data, params) => http(api + "detail", data, "post", params),
+  detail: (data, params) => http(api + "cgddiffinfo", data, "post", params),
   // 更新
   // 更新
   update: (data, params) => http(api + "update", data, "post", params),
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改状态
   // 修改状态

+ 5 - 14
src/views/purchaseIn/purchaseDiffOrder/addEditModel.vue

@@ -163,25 +163,16 @@ export default {
       await this.$refs.ruleForm.validate(async (valid) => {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
         if (valid) {
           this.loading = true;
           this.loading = true;
-          const { username, name, mobile, email, role_id, status } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
+          const { cgdNo, num } = this.ruleForm;
           const model = {
           const model = {
-            id: this.id,
-            username: username || "", // 账号
-            nickname: name || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role: role_id || "",
-            status: status || "",
+            cgdNo: cgdNo,
+            diff_weight: num,
           };
           };
-          let res  = await asyncRequest.add(model);
-       
+          let res = await asyncRequest.add(model);
           this.loading = false;
           this.loading = false;
           if (res && res.code === 0) {
           if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
             this.$notify.success({
             this.$notify.success({
-              title,
+              title: "添加成功!",
               message: "",
               message: "",
             });
             });
             this.showModelThis = false;
             this.showModelThis = false;

+ 3 - 3
src/views/purchaseIn/purchaseDiffOrder/detail.vue

@@ -46,7 +46,7 @@
    <script>
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
+import asyncRequest from "@/apis/service/purchaseIn/purchaseDiffOrder";
 import addEdit from "./addEdit";
 import addEdit from "./addEdit";
 export default {
 export default {
   name: "purchaseDiffOrderDetail",
   name: "purchaseDiffOrderDetail",
@@ -101,7 +101,7 @@ export default {
   },
   },
   mounted() {
   mounted() {
     this.queryId = this.$route.query.id;
     this.queryId = this.$route.query.id;
-    // this.initData();
+    this.initData();
   },
   },
   methods: {
   methods: {
     getNewTime() {
     getNewTime() {
@@ -116,7 +116,7 @@ export default {
     },
     },
     async initData() {
     async initData() {
       this.loading = true;
       this.loading = true;
-      const res = await asyncRequest.detail({ cgdNo: this.queryId });
+      const res = await asyncRequest.detail({ id: this.queryId });
       if (res && res.code === 0 && res.data) {
       if (res && res.code === 0 && res.data) {
         this.sitem = res.data;
         this.sitem = res.data;
         this.status = this.sitem.status;
         this.status = this.sitem.status;

+ 64 - 77
src/views/purchaseIn/purchaseDiffOrder/index.vue

@@ -27,13 +27,13 @@
           <div style="width: 100%">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
               <el-col :span="24">
-                <el-col :span="4" style="width: 120px">
+                <el-col :span="4" style="width: 140px">
                   <el-select
                   <el-select
                     :size="searchSize"
                     :size="searchSize"
                     v-model="parmValue.status"
                     v-model="parmValue.status"
                     filterable
                     filterable
                     clearable
                     clearable
-                    placeholder="账号状态"
+                    placeholder="工差单状态"
                     style="width: 100%"
                     style="width: 100%"
                     @change="
                     @change="
                       pageInfo.curr = 1;
                       pageInfo.curr = 1;
@@ -42,10 +42,10 @@
                     "
                     "
                   >
                   >
                     <el-option
                     <el-option
-                      v-for="item in statusList"
+                      v-for="item in statusOptions"
                       :key="'status' + item.code"
                       :key="'status' + item.code"
-                      :label="item.name"
-                      :value="item.code"
+                      :label="item.label"
+                      :value="item.id"
                     />
                     />
                   </el-select>
                   </el-select>
                 </el-col>
                 </el-col>
@@ -60,52 +60,6 @@
                   />
                   />
                 </el-col>
                 </el-col>
 
 
-                <el-col :span="12" style="width: 380px; padding: 0 0 0 10px">
-                  <el-input
-                    placeholder="关键字"
-                    v-model="input"
-                    :size="searchSize"
-                    class="input-with-select"
-                  >
-                    <el-select
-                      v-model="select"
-                      :size="searchSize"
-                      slot="prepend"
-                      style="width: 115px"
-                      placeholder="查找类型"
-                    >
-                      <el-option label="工差单编号" value="1"></el-option>
-                      <el-option label="采购单编号" value="2"></el-option>
-                      <el-option label="申请人" value="3"></el-option>
-                    </el-select>
-                    <el-button slot="append" icon="el-icon-search"></el-button>
-                  </el-input>
-                </el-col>
-                <!-- <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="searchSize"
-                    v-model="parmValue.name"
-                    :maxlength="40"
-                    placeholder="业务员姓名"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="searchSize"
-                    v-model="parmValue.username"
-                    :maxlength="40"
-                    placeholder="手机号"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    class="fr"
-                    icon="el-icon-search"
-                    @click="searchList"
-                /></el-col>-->
-
                 <el-col :span="3" style="width: 66px; float: right">
                 <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                   <el-button
                     :size="searchSize"
                     :size="searchSize"
@@ -126,16 +80,34 @@
                     重置
                     重置
                   </el-button>
                   </el-button>
                 </el-col>
                 </el-col>
-                <!-- <el-col :span="3" style="width: 66px; float: right">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    style="float: right; margin-left: 5px"
-                    @click="openModal('add', false, {})"
-                  >
-                    新建工差
-                  </el-button>
-                </el-col> -->
+              </el-col>
+            </el-row>
+            <el-row style="padding:10px 0 0 0">
+              <el-col :span="4" style="width: 320px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.cgdNo"
+                  :maxlength="40"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                  placeholder="采购单编号"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 180px; padding: 0 0 0 10px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.apply_name"
+                  :maxlength="40"
+                  placeholder="申请人"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                />
               </el-col>
               </el-col>
             </el-row>
             </el-row>
           </div>
           </div>
@@ -183,7 +155,6 @@
    <script>
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
-import statusList from "@/assets/js/statusList";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseDiffOrder";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseDiffOrder";
 // import addEditModel from "./addEditModel";
 // import addEditModel from "./addEditModel";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
@@ -215,11 +186,12 @@ export default {
       input: "",
       input: "",
       // 状态
       // 状态
       statusOptions: [
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "0", label: "待发起审核" },
+        { id: "1", label: "待通知采购部门" },
+        { id: "2", label: "待通知财务部门" },
+        { id: "3", label: "已完成" },
       ],
       ],
-      statusList: statusList,
-      loading: false,
+      loading: true,
       showModel: false,
       showModel: false,
       isDetail: false,
       isDetail: false,
       modelId: 0,
       modelId: 0,
@@ -253,30 +225,45 @@ export default {
       // 表格 - 列参数
       // 表格 - 列参数
       columns: [
       columns: [
         {
         {
-          prop: "nickname",
-          label: "真实姓名",
+          prop: "cgdNo",
+          label: "采购单编号",
+          width: "160px",
+        },
+        {
+          prop: "apply_name",
+          label: "申请人",
+          width: "65px",
         },
         },
         {
         {
-          prop: "role_name",
-          label: "角色名称",
+          prop: "good_code",
+          label: "商品编码",
+          width: "150px",
         },
         },
         {
         {
-          prop: "mobile",
-          label: "联系电话",
+          prop: "good_name",
+          label: "商品名称",
         },
         },
         {
         {
-          prop: "email",
-          label: "邮箱",
+          prop: "good_weight",
+          label: "商品总重量(g)",
+          width: "110px",
         },
         },
+        {
+          prop: "diff_weight",
+          label: "工差总重量(g)",
+          width: "110px",
+        },
+
         {
         {
           prop: "status",
           prop: "status",
           label: "状态",
           label: "状态",
           _slot_: "status",
           _slot_: "status",
-          width: "80px",
+          width: "120px",
         },
         },
         {
         {
           prop: "addtime",
           prop: "addtime",
           label: "创建时间",
           label: "创建时间",
+          width: "140px",
           sortable: true,
           sortable: true,
         },
         },
         {
         {
@@ -291,8 +278,8 @@ export default {
     };
     };
   },
   },
   mounted() {
   mounted() {
-    this.tableData = [{ value: "", id: "1" }];
-    // this.searchList();
+    // this.tableData = [{ value: "", id: "1" }];
+    this.searchList();
   },
   },
 
 
   methods: {
   methods: {