Browse Source

页面修改

huangyw 3 years ago
parent
commit
ba7f04ea71

+ 5 - 4
src/api/supply.js View File

275
   })
275
   })
276
 }
276
 }
277
 
277
 
278
-// export function updatesupply(data) {
278
+
279
+// export function getsupplytype(params) {
279
 //   return request({
280
 //   return request({
280
-//     url: '/api/supply/updatesupply' ,
281
-//     method: 'post',
282
-//     data: data
281
+//     url: '/api/supply/getsupplytype' ,
282
+//     method: 'get',
283
+//     params: params
283
 //   })
284
 //   })
284
 // }
285
 // }
285
 
286
 

+ 35 - 15
src/xt_pages/supply/components/addSupply.vue View File

60
         </el-row>
60
         </el-row>
61
       </el-form>
61
       </el-form>
62
 
62
 
63
-      <el-form
64
-        :rules="tableRules"
65
-        :model="recordInfo"
66
-        ref="recordInfo"
67
-        class="tableclass"
68
-      >
63
+      <el-form :model="recordInfo" ref="recordInfo" class="tableclass">
69
         <el-table
64
         <el-table
70
           :row-style="{ color: '#303133' }"
65
           :row-style="{ color: '#303133' }"
71
           :header-cell-style="{
66
           :header-cell-style="{
83
             <template slot="header" slot-scope="scope">
78
             <template slot="header" slot-scope="scope">
84
               <span>联系人<span style="color: red">*</span></span>
79
               <span>联系人<span style="color: red">*</span></span>
85
             </template>
80
             </template>
81
+            <!-- tableRules.name -->
86
             <template slot-scope="scope">
82
             <template slot-scope="scope">
87
               <el-form-item
83
               <el-form-item
88
                 :prop="'contacts.' + scope.$index + '.name'"
84
                 :prop="'contacts.' + scope.$index + '.name'"
89
-                :rules="tableRules.name"
85
+                :rules="
86
+                  scope.row.name != ''
87
+                    ? [
88
+                        {
89
+                          required: 'true',
90
+                          message: '请输入主要联系人',
91
+                          trigger: ['blur', 'change'],
92
+                        },
93
+                      ]
94
+                    : null
95
+                "
90
               >
96
               >
91
                 <el-input
97
                 <el-input
92
                   v-model="scope.row.name"
98
                   v-model="scope.row.name"
362
             this.$refs[formName].validate((valid) => {
368
             this.$refs[formName].validate((valid) => {
363
               if (valid) {
369
               if (valid) {
364
                 let params = {
370
                 let params = {
365
-                  ...this.supplier,
366
-                  ...this.recordInfo,
371
+                  suppliercode: this.supplier.supplierCode,
372
+                  suppliername: this.supplier.supplierName,
373
+                  // ...this.recordInfo
374
+                  id: parseInt(this.supplier_ids),
375
+                  // id:JSON.parse(this.supplier_ids),
376
+                  suppliertype: "",
377
+                  vatrate: "",
378
+                  number: "",
379
+                  bank: "",
380
+                  bankaccount: "",
381
+                  contacts: [...this.recordInfo.contacts],
367
                 };
382
                 };
368
                 console.log(params, "dhas");
383
                 console.log(params, "dhas");
369
                 savesupply(params).then((res) => {});
384
                 savesupply(params).then((res) => {});
383
             this.$refs[formName].validate((valid) => {
398
             this.$refs[formName].validate((valid) => {
384
               if (valid) {
399
               if (valid) {
385
                 let params = {
400
                 let params = {
386
-                  suppliercode:this.supplier.supplierCode,
387
-                  suppliername:this.supplier.supplierName,
388
-                  tmp:"测试",
401
+                  suppliercode: this.supplier.supplierCode,
402
+                  suppliername: this.supplier.supplierName,
389
                   // ...this.recordInfo
403
                   // ...this.recordInfo
390
-                  id:this.supplier_ids,
391
-                  contacts:[...this.recordInfo.contacts]
404
+                  id: parseInt(this.supplier_ids),
405
+                  // id:JSON.parse(this.supplier_ids),
406
+                  suppliertype: "",
407
+                  vatrate: "",
408
+                  number: "",
409
+                  bank: "",
410
+                  bankaccount: "",
411
+                  contacts: [...this.recordInfo.contacts],
392
                 };
412
                 };
393
                 console.log(this.recordInfo, "dhas");
413
                 console.log(this.recordInfo, "dhas");
394
-                console.log(typeof(this.supplier_ids),'oo')
414
+                console.log(typeof this.supplier_ids, "oo");
395
                 updatesupply(params).then((res) => {
415
                 updatesupply(params).then((res) => {
396
                   console.log(res, "oo");
416
                   console.log(res, "oo");
397
                 });
417
                 });

+ 0 - 3
src/xt_pages/supply/goodOrderQuery.vue View File

267
           page:this.page,
267
           page:this.page,
268
           limit:this.limit,
268
           limit:this.limit,
269
         }
269
         }
270
-       console.log("param2323322332",params)
271
        getAllGoodOrderList(params).then(response=>{
270
        getAllGoodOrderList(params).then(response=>{
272
           if(response.data.state == 1){
271
           if(response.data.state == 1){
273
             var list = response.data.data.list 
272
             var list = response.data.data.list 
274
-            console.log("购货单列表",list)
275
             this.tableList = list
273
             this.tableList = list
276
             var total = response.data.data.total
274
             var total = response.data.data.total
277
             this.total = total
275
             this.total = total
341
        this.$router.push({path:"/good/order/edit?id="+val.id+"&warehousing_id="+val.warehousing_id})
339
        this.$router.push({path:"/good/order/edit?id="+val.id+"&warehousing_id="+val.warehousing_id})
342
      },
340
      },
343
      toDelete(val,index){
341
      toDelete(val,index){
344
-       console.log("val323223233223",val)
345
        if(val.is_check == 1){
342
        if(val.is_check == 1){
346
          this.$message.error("已审核单据,不能删除!")
343
          this.$message.error("已审核单据,不能删除!")
347
          return false
344
          return false

+ 25 - 48
src/xt_pages/supply/supplyQuery.vue View File

15
         <div>
15
         <div>
16
           <el-select
16
           <el-select
17
             v-model="type_name"
17
             v-model="type_name"
18
-            style="width: 140px; margin-right: 10px"
19
-            placeholder="请选择"
18
+            style="width: 170px; margin-right: 10px"
19
+            placeholder="请选择供应商类别"
20
             @change="changeTypeName"
20
             @change="changeTypeName"
21
           >
21
           >
22
             <el-option
22
             <el-option
23
-              v-for="item in types"
23
+              v-for="item in sType"
24
               :key="item.id"
24
               :key="item.id"
25
-              :label="item.type_name"
26
-              :value="item.id"
25
+              :label="item.name"
26
+              :value="item.value"
27
             >
27
             >
28
             </el-option>
28
             </el-option>
29
           </el-select>
29
           </el-select>
30
-          <el-date-picker
31
-            size="small"
32
-            v-model="start_time"
33
-            prefix-icon="el-icon-date"
34
-            :editable="false"
35
-            style="width: 196px"
36
-            type="date"
37
-            placeholder="选择日期时间"
38
-            align="right"
39
-            format="yyyy-MM-dd"
40
-            value-format="yyyy-MM-dd"
41
-            @change="startTimeChange"
42
-          ></el-date-picker
43
-          >-
44
-          <el-date-picker
45
-            size="small"
46
-            v-model="end_time"
47
-            prefix-icon="el-icon-date"
48
-            :editable="false"
49
-            style="width: 196px"
50
-            type="date"
51
-            placeholder="选择日期时间"
52
-            align="right"
53
-            format="yyyy-MM-dd"
54
-            value-format="yyyy-MM-dd"
55
-            @change="endTimeChange"
56
-          ></el-date-picker>
57
-          <el-input
58
-            size="small"
59
-            style="width: 200px; margin-left: 10px"
60
-            class="filter-item"
61
-            v-model.trim="keywords"
62
-            placeholder="耗材名称"
63
-          />
30
+
64
           <el-button
31
           <el-button
65
             size="small"
32
             size="small"
66
             class="filter-item"
33
             class="filter-item"
90
       >
57
       >
91
         <el-table-column prop="SupplierType" label="供应商类别" align="center">
58
         <el-table-column prop="SupplierType" label="供应商类别" align="center">
92
           <template slot-scope="scope">
59
           <template slot-scope="scope">
93
-            <span>{{ scope.row.SupplierType }}</span>
60
+            <span>{{ scope.row.TypeName }}</span>
94
           </template>
61
           </template>
95
         </el-table-column>
62
         </el-table-column>
96
         <el-table-column prop="SupplierCode" label="供应商编码" align="center">
63
         <el-table-column prop="SupplierCode" label="供应商编码" align="center">
175
 <script>
142
 <script>
176
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
143
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
177
 import addSupply from "./components/addSupply.vue";
144
 import addSupply from "./components/addSupply.vue";
178
-import {
179
-  getexporthistory,
180
-  delsupplys
181
-} from "@/api/supply";
145
+import { getexporthistory, delsupplys, getsupplytype } from "@/api/supply";
182
 export default {
146
 export default {
183
   name: "stockIn",
147
   name: "stockIn",
184
   created() {
148
   created() {
149
+    this.getsupplytype();
185
     // this.initSupplierData()
150
     // this.initSupplierData()
186
     this.org_id = this.$store.getters.xt_user.org_id;
151
     this.org_id = this.$store.getters.xt_user.org_id;
187
 
152
 
207
       page: 1,
172
       page: 1,
208
       limit: 10,
173
       limit: 10,
209
 
174
 
210
-      type_name: "",
175
+      type_name: 0,
211
       crumbs: [
176
       crumbs: [
212
         { path: false, name: "采购管理" },
177
         { path: false, name: "采购管理" },
213
         { path: "/supply/good/order/query", name: "供应商管理" },
178
         { path: "/supply/good/order/query", name: "供应商管理" },
226
       types: [],
191
       types: [],
227
       tableList: [],
192
       tableList: [],
228
       tyep_name: "",
193
       tyep_name: "",
194
+      sType: [],
229
     };
195
     };
230
   },
196
   },
197
+
231
   methods: {
198
   methods: {
232
     initData() {
199
     initData() {
233
       let params = {
200
       let params = {
234
         limit: this.limit,
201
         limit: this.limit,
235
         page: this.page,
202
         page: this.page,
203
+        ctype: this.type_name,
236
       };
204
       };
237
       getexporthistory(params).then((res) => {
205
       getexporthistory(params).then((res) => {
238
         if (res.data.state == 1) {
206
         if (res.data.state == 1) {
242
       });
210
       });
243
     },
211
     },
244
 
212
 
213
+    getsupplytype() {
214
+      getsupplytype().then((res) => {
215
+        if (res.data.state == 1) {
216
+          this.sType = res.data.data.list;
217
+        }
218
+        console.log(res, "oo");
219
+      });
220
+    },
221
+
245
     toDelete(val, index) {
222
     toDelete(val, index) {
246
       delsupplys(val.ID)
223
       delsupplys(val.ID)
247
         .then((res) => {
224
         .then((res) => {
257
         });
234
         });
258
     },
235
     },
259
 
236
 
260
-   
261
-
262
     toAdd(val) {
237
     toAdd(val) {
263
       this.$refs.addSupply.show(1, val);
238
       this.$refs.addSupply.show(1, val);
264
     },
239
     },
265
     toClick(data, val) {
240
     toClick(data, val) {
266
       this.$refs.addSupply.show(data, val);
241
       this.$refs.addSupply.show(data, val);
267
     },
242
     },
268
-    changeTypeName() {},
243
+    changeTypeName() {
244
+      this.initData();
245
+    },
269
     startTimeChange() {},
246
     startTimeChange() {},
270
     endTimeChange() {},
247
     endTimeChange() {},
271
     search() {},
248
     search() {},