Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
160e170cff

+ 2 - 2
config/dev.env.js View File

@@ -7,8 +7,8 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  BASE_API: '"http://localhost:9529"',
10
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  // BASE_API: '"http://localhost:9529"',
12 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 8 - 0
src/api/supply.js View File

@@ -199,3 +199,11 @@ export function deleteGoodOrder(id, params) {
199 199
     params: params
200 200
   })
201 201
 }
202
+
203
+export function getSupplyWarehouseOutById(id, params) {
204
+  return request({
205
+    url: '/api/supply/getsupplywarehouseoutbyid?id=' + id,
206
+    method: 'get',
207
+    params: params
208
+  })
209
+}

+ 4 - 4
src/views/layout/Layout.vue View File

@@ -16,10 +16,10 @@
16 16
           <i class="iconfont icon-computer_fill navIcon"></i>
17 17
           <p>透析管理</p>
18 18
         </div>
19
-<!--        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">-->
20
-<!--          <i class="iconfont icon-kccx navIcon"></i>-->
21
-<!--          <p>采购管理</p>-->
22
-<!--        </div>-->
19
+        <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
+         <i class="iconfont icon-kccx navIcon"></i>
21
+          <p>采购管理</p>
22
+        </div> -->
23 23
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
24 24
           <i class="iconfont icon-kccx navIcon"></i>
25 25
           <p>库房管理</p>

+ 8 - 7
src/xt_pages/data/components/addDrugs.vue View File

@@ -354,7 +354,7 @@
354 354
                             </el-date-picker>
355 355
                         </el-form-item>
356 356
                       
357
-                        <!-- <el-form-item label="是否零用:">
357
+                        <el-form-item label="是否零用:">
358 358
 
359 359
                             <el-select v-model="form.is_user" style="width:160px" filterable placeholder="请选择">
360 360
                                 <el-option
@@ -364,7 +364,7 @@
364 364
                                         :value="item.id">
365 365
                                 </el-option>
366 366
                             </el-select>
367
-                        </el-form-item> -->
367
+                        </el-form-item>
368 368
                       
369 369
 
370 370
                         <el-form-item label="药品备注:">
@@ -595,7 +595,7 @@
595 595
           prescribing_number_unit:"",
596 596
           total:"",
597 597
           specification_name:"",
598
-          is_user:2,
598
+          is_user:"2",
599 599
         },
600 600
 
601 601
         rules: {
@@ -648,11 +648,11 @@
648 648
         minNumberShow:false,
649 649
         packingUnit:[],
650 650
         userList: [{
651
-          id: '1',
652
-          name: '是'
651
+          id: "1",
652
+          name: "是"
653 653
         }, {
654
-          id: '2',
655
-          name: '否'
654
+          id: "2",
655
+          name: "否"
656 656
         }],
657 657
       }
658 658
     },
@@ -781,6 +781,7 @@
781 781
           }
782 782
 
783 783
           this.form['lmt_used_flag'] = 0
784
+          this.form['is_user'] = "2"
784 785
 
785 786
         } else {
786 787
           for (let key in obj) {

+ 33 - 36
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -7,8 +7,7 @@
7 7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 8
     <div>
9 9
         <span style="color:red">*</span><span>供应商:</span>
10
-        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
11
-        @change="changeTypeName">
10
+        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择">
12 11
         <el-option
13 12
             v-for="item in supplyList"
14 13
             :key="item.id"
@@ -28,7 +27,6 @@
28 27
         align="right"
29 28
         format="yyyy-MM-dd"
30 29
         value-format="yyyy-MM-dd"
31
-        @change="startTimeChange"
32 30
         ></el-date-picker>
33 31
         <!-- <span>交货日期:</span> -->
34 32
         <!-- <el-date-picker
@@ -75,7 +73,7 @@
75 73
         </template>
76 74
         <template slot-scope="scope">
77 75
            <el-form-item :prop="'tableList.' + scope.$index + '.name'" :rules='tableRules.name'>
78
-            <el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择" @change="changeName"   @input="changeGoodName(scope.$index)" :disabled="disabled">
76
+            <el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择商品" @change="changeName"   @input="changeGoodName(scope.$index)" :disabled="disabled">
79 77
                 <el-option
80 78
                     v-for="(item,index) in tabList"
81 79
                     :key="index"
@@ -91,13 +89,13 @@
91 89
             <span>商品类别</span>
92 90
         </template>
93 91
         <template slot-scope="scope">
94
-            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"></el-input>
92
+            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"  placeholder="商品类别"></el-input>
95 93
             <div style="visibility: hidden">/</div>
96 94
         </template>
97 95
     </el-table-column>
98
-    <el-table-column label="规格&单位" align="center" width="120px">
96
+    <el-table-column label="规格&单位" align="center" width="150px">
99 97
         <template slot-scope="scope">
100
-            <el-input v-model="scope.row.supply_specification_name" style="width:100px" :disabled="true"></el-input>
98
+            <el-input v-model="scope.row.supply_specification_name" style="width:120px" :disabled="true" placeholder="规格&单位"></el-input>
101 99
             <div style="visibility: hidden">/</div>
102 100
         </template>
103 101
     </el-table-column>
@@ -118,13 +116,13 @@
118 116
           </el-form-item>  
119 117
         </template>
120 118
     </el-table-column>
121
-    <el-table-column label="批号" align="center" width="130px">
119
+    <el-table-column label="批号" align="center" width="200px">
122 120
          <template slot="header" slot-scope="scope">
123 121
             <span>批号<span style="color: red">*</span></span>
124 122
         </template>
125 123
         <template slot-scope="scope">
126 124
            <el-form-item  :prop="'tableList.' + scope.$index + '.supply_batch_number'" :rules='tableRules.supply_batch_number'>
127
-             <el-input v-model="scope.row.supply_batch_number" style="width:80px" :disabled="disabled"></el-input>
125
+             <el-input v-model="scope.row.supply_batch_number" style="width:180px" :disabled="disabled" placeholder="请输入批号"></el-input>
128 126
           </el-form-item>
129 127
         </template>
130 128
     </el-table-column>
@@ -142,26 +140,26 @@
142 140
              </el-form-item>
143 141
        </template>
144 142
     </el-table-column>
145
-    <el-table-column label="可用库存" align="center" width="100px">
143
+    <el-table-column label="可用库存" align="center" width="150px">
146 144
         <template slot-scope="scope">
147
-            <el-input v-model="scope.row.supply_total" style="width:80px" :disabled="true"></el-input>
145
+            <el-input v-model="scope.row.supply_total" style="width:100px" :disabled="true"></el-input>
148 146
             <div style="visibility: hidden">/</div>
149 147
         </template>
150 148
     </el-table-column>
151
-    <el-table-column label="数量" align="center" width="120px">
149
+    <el-table-column label="数量" align="center" width="140px">
152 150
         <template slot="header" slot-scope="scope">
153 151
             <span>数量<span style="color: red">*</span></span>
154 152
         </template>
155 153
         <template slot-scope="scope">
156 154
           <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
157
-             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled"></el-input>
155
+             <el-input v-model="scope.row.supply_count" style="width:100px" :disabled="disabled" placeholder="请输入数量"></el-input>
158 156
           </el-form-item>
159 157
         </template>
160 158
     </el-table-column>
161 159
 
162
-    <el-table-column label="采购单价" align="center" width="120px">
160
+    <el-table-column label="采购单价" align="center" width="180px">
163 161
         <template slot-scope="scope">
164
-        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
162
+        <el-input v-model="scope.row.supply_price" style="width:140px" :disabled="disabled"  placeholder="请输入采购单价"></el-input>
165 163
         <div style="visibility: hidden">/</div>
166 164
         </template>
167 165
     </el-table-column>
@@ -216,7 +214,7 @@
216 214
 
217 215
     <el-table-column label="备注" align="center" width="200px">
218 216
         <template slot-scope="scope">
219
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
217
+        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled" placeholder="请输入备注"></el-input>
220 218
         <div style="visibility: hidden">/</div>
221 219
         </template>
222 220
     </el-table-column>
@@ -243,18 +241,27 @@
243 241
         </template>
244 242
     </el-table-column>
245 243
   </el-table>
244
+   <div style="margin-top: 10px">
245
+        <el-input
246
+          type="textarea"
247
+          :rows="2"
248
+          placeholder="备注信息"
249
+          v-model="return_remark"
250
+        >
251
+        </el-input>
252
+   </div>
246 253
 </el-form>
247 254
    <div style="margin-top:10px">
248 255
       合计:{{getAllPrice()}} 元
249 256
    </div>
250 257
    <div style="margin-top:10px">
251
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
258
+        <span>优惠率:<el-input style="width:150px" v-model="rate_of_concession" placeholder="请输入优惠率"></el-input>%</span>
252 259
 
253
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
260
+        <span>优惠金额:<el-input style="width:150px" v-model="discount_amount" placeholder="请输入优惠金额"></el-input></span>
254 261
       
255
-        <span>本次付款:<el-input style="width:100px" v-model="payment"></el-input></span>
262
+        <span>本次付款:<el-input style="width:150px" v-model="payment" placeholder="请输入本次付款"></el-input></span>
256 263
 
257
-        <span>本次欠款:<el-input style="width:100px" v-model="arrearage"></el-input></span>
264
+        <span>本次欠款:<el-input style="width:150px" v-model="arrearage" placeholder="请输入本次欠款"></el-input></span>
258 265
     </div>
259 266
 </div>
260 267
 
@@ -342,6 +349,7 @@ return {
342 349
    showOne:true,
343 350
    showTwo:false,
344 351
    warese_out_id:0,
352
+   return_remark:"",
345 353
   };
346 354
 },
347 355
 methods:{
@@ -503,20 +511,6 @@ handleDelete: function(index, row) {
503 511
         this.recordInfo.tableList.splice(index, 1)
504 512
    }
505 513
 },
506
-
507
-changeTypeName(){
508
-
509
-},
510
-startTimeChange(){
511
-
512
-},
513
-endTimeChange(){
514
-
515
-},
516
-search(){
517
-
518
-},
519
-
520 514
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
521 515
     var total = 0
522 516
     var max_str=  ""
@@ -690,7 +684,8 @@ getTimes(time) {
690 684
            this.loading = true
691 685
            var warehousing_id = this.$route.query.id
692 686
            var params = {
693
-             "stockIn":this.recordInfo.tableList,
687
+             stockIn:this.recordInfo.tableList,
688
+             return_remake:this.return_remark,
694 689
            }
695 690
         console.log("stockIN2323322332322323",params)  
696 691
        
@@ -709,6 +704,7 @@ getTimes(time) {
709 704
              this.payment =warehouseOut.payment
710 705
              this.arrearage =warehouseOut.arrearage
711 706
              this.supplier_name = warehouseOut.supplier_id
707
+             this.return_remake = warehouseOut.return_remake
712 708
              this.start_time = this.getTimes(warehouseOut.document_date)
713 709
             for(let i=0;i< orderInfo.length;i++){
714 710
               orderInfo[i].supply_count =  orderInfo[i].count
@@ -783,7 +779,8 @@ getTimes(time) {
783 779
            this.loading = true
784 780
            var warehose_out_id = this.$route.query.id
785 781
            var params = {
786
-             "stockIn":this.recordInfo.tableList,
782
+             stockIn:this.recordInfo.tableList,
783
+             return_remake:this.return_remake,
787 784
            } 
788 785
            console.log("sotckind23232232323232323232",params)
789 786
            

+ 9 - 4
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -96,7 +96,7 @@
96 96
                   v-model="scope.row.name"
97 97
                   style="width: 160px"
98 98
                   filterable
99
-                  placeholder="请选择"
99
+                  placeholder="请选择商品"
100 100
                   @change="changeName"
101 101
                   @input="changeGoodName(scope.$index)"
102 102
                   :disabled="disabled"
@@ -121,6 +121,7 @@
121 121
                 v-model="scope.row.supply_type"
122 122
                 style="width: 120px"
123 123
                 :disabled="true"
124
+                placeholder="商品类别"
124 125
               ></el-input>
125 126
             </template>
126 127
           </el-table-column>
@@ -130,6 +131,7 @@
130 131
                 v-model="scope.row.supply_specification_name"
131 132
                 style="width: 150px"
132 133
                 :disabled="true"
134
+                 placeholder="规格&单位"
133 135
               ></el-input>
134 136
             </template>
135 137
           </el-table-column>
@@ -166,6 +168,7 @@
166 168
                 v-model="scope.row.supply_specification_name"
167 169
                 style="width: 150px"
168 170
                 :disabled="true"
171
+                placeholder="可退数量"
169 172
               ></el-input>
170 173
             </template>
171 174
           </el-table-column>
@@ -187,17 +190,18 @@
187 190
             </template>
188 191
           </el-table-column>
189 192
 
190
-          <el-table-column label="购货单价" align="center" width="120px">
193
+          <el-table-column label="采购单价" align="center" width="180px">
191 194
             <template slot-scope="scope">
192 195
               <el-input
193 196
                 v-model="scope.row.supply_price"
194
-                style="width: 80px"
197
+                style="width: 140px"
195 198
                 :disabled="disabled"
199
+                 placeholder="请输入采购单价"
196 200
               ></el-input>
197 201
             </template>
198 202
           </el-table-column>
199 203
 
200
-          <el-table-column label="购金额" align="center" width="120px">
204
+          <el-table-column label="购金额" align="center" width="120px">
201 205
             <template slot-scope="scope">
202 206
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
203 207
             </template>
@@ -250,6 +254,7 @@
250 254
                 v-model="scope.row.supply_remake"
251 255
                 style="width: 160px"
252 256
                 :disabled="disabled"
257
+                placeholder="请输入备注"
253 258
               ></el-input>
254 259
             </template>
255 260
           </el-table-column>

+ 25 - 25
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -191,7 +191,7 @@
191 191
               <div style="visibility: hidden">/</div>
192 192
             </template>
193 193
           </el-table-column>
194
-          <el-table-column label="数量" align="center" width="120px">
194
+          <el-table-column label="数量" align="center" width="140px">
195 195
             <template slot="header" slot-scope="scope">
196 196
               <span>数量<span style="color: red">*</span></span>
197 197
             </template>
@@ -199,22 +199,22 @@
199 199
               <el-form-item
200 200
                 :prop="'tableList.' + scope.$index + '.supply_count'"
201 201
                 :rules="tableRules.supply_count"
202
-                 placeholder="请输入数量"
203 202
               >
204 203
                 <el-input
205 204
                   v-model="scope.row.supply_count"
206
-                  style="width: 80px"
205
+                  style="width: 100px"
207 206
                   :disabled="disabled"
207
+                  placeholder="请输入数量"
208 208
                 ></el-input>
209 209
               </el-form-item>
210 210
             </template>
211 211
           </el-table-column>
212 212
 
213
-          <el-table-column label="购货单价" align="center" width="140px">
213
+          <el-table-column label="采购单价" align="center" width="180px">
214 214
             <template slot-scope="scope">
215 215
               <el-input
216 216
                 v-model="scope.row.supply_price"
217
-                style="width: 80px"
217
+                style="width: 140px"
218 218
                 :disabled="disabled"
219 219
                  placeholder="请输入购货单价"
220 220
               ></el-input>
@@ -309,6 +309,15 @@
309 309
             </template>
310 310
           </el-table-column>
311 311
         </el-table>
312
+        <div style="margin-top: 10px">
313
+        <el-input
314
+          type="textarea"
315
+          :rows="2"
316
+          placeholder="备注信息"
317
+          v-model="return_remark"
318
+        >
319
+        </el-input>
320
+       </div>
312 321
         <!-- 审核水印 -->
313 322
         <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
314 323
 
@@ -317,19 +326,19 @@
317 326
       <div style="margin-top: 10px">
318 327
         <span
319 328
           >优惠率:<el-input
320
-            style="width: 100px"
329
+            style="width: 150px"
321 330
             v-model="rate_of_concession"
322 331
             @input="addressChange"
323
-            @placeholder="请输入优惠率"
332
+            placeholder="请输入优惠率"
324 333
           ></el-input
325 334
           >%</span
326 335
         >
327 336
 
328 337
         <span
329 338
           >优惠金额:<el-input
330
-            style="width: 100px"
339
+            style="width: 150px"
331 340
             v-model="discount_amount"
332
-            @placeholder="请输入优惠金额"
341
+            placeholder="请输入优惠金额"
333 342
           ></el-input
334 343
         ></span>
335 344
       </div>
@@ -351,21 +360,6 @@ import {
351 360
 import { getDataConfig } from "@/utils/data";
352 361
 export default {
353 362
   name: "addPurchaseOrder",
354
-  created() {
355
-    this.org_id = this.$store.getters.xt_user.org_id;
356
-
357
-    var start_time = window.sessionStorage.getItem("start_time");
358
-    var end_time = window.sessionStorage.getItem("end_time");
359
-
360
-    if (start_time != null) {
361
-      this.start_time = start_time;
362
-    }
363
-    if (end_time != null) {
364
-      this.end_time = end_time;
365
-    }
366
-    window.sessionStorage.removeItem("start_time");
367
-    window.sessionStorage.removeItem("end_time");
368
-  },
369 363
   components: {
370 364
     BreadCrumb,
371 365
   },
@@ -430,6 +424,7 @@ export default {
430 424
       ],
431 425
       goodList: [{ id: 1, name: "" }],
432 426
       total_price: 0,
427
+      return_remark:"",
433 428
     };
434 429
   },
435 430
   methods: {
@@ -659,9 +654,11 @@ export default {
659 654
           var end = this.getTimes(this.end_time);
660 655
           const params = {
661 656
             stockIn: this.recordInfo.tableList,
657
+            return_remake:this.return_remark,
662 658
           };
663
-
659
+          
664 660
           console.log("params23322323", params);
661
+          
665 662
           savePurchaseOrder(
666 663
             params,
667 664
             this.supplier_name,
@@ -675,10 +672,12 @@ export default {
675 672
               this.loading = false;
676 673
               this.$message.success("保存成功!");
677 674
               var warehouseInfo = response.data.data.warehouseInfo;
675
+            
678 676
               if(warehouseInfo.is_check == 1){
679 677
                 this.Reviewed = true
680 678
               }
681 679
               this.number = warehouseInfo.number;
680
+              this.return_remark = warehouseInfo.return_remake
682 681
               this.id = warehouseInfo.id;
683 682
               this.recordInfo.tableList = [];
684 683
               var orderInfo = response.data.data.orderInfo;
@@ -824,6 +823,7 @@ export default {
824 823
           var end = this.getTimes(this.end_time);
825 824
           const params = {
826 825
             stockIn: this.recordInfo.tableList,
826
+            return_remake:this.return_remake,
827 827
           };
828 828
           console.log("params23232233223", params);
829 829
 

+ 50 - 29
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -91,13 +91,13 @@
91 91
             <span>商品类别</span>
92 92
         </template>
93 93
         <template slot-scope="scope">
94
-            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"></el-input>
94
+            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true" placeholder="商品类别"></el-input>
95 95
             <div style="visibility: hidden">/</div>
96 96
         </template>
97 97
     </el-table-column>
98
-    <el-table-column label="规格&单位" align="center" width="120px">
98
+    <el-table-column label="规格&单位" align="center" width="150px">
99 99
         <template slot-scope="scope">
100
-            <el-input v-model="scope.row.supply_specification_name" style="width:100px" :disabled="true"></el-input>
100
+            <el-input v-model="scope.row.supply_specification_name" style="width:120px" :disabled="true" placeholder="规格&单位"></el-input>
101 101
             <div style="visibility: hidden">/</div>
102 102
         </template>
103 103
     </el-table-column>
@@ -118,13 +118,13 @@
118 118
           </el-form-item>  
119 119
         </template>
120 120
     </el-table-column>
121
-    <el-table-column label="批号" align="center" width="130px">
121
+    <el-table-column label="批号" align="center" width="200px">
122 122
          <template slot="header" slot-scope="scope">
123 123
             <span>批号<span style="color: red">*</span></span>
124 124
         </template>
125 125
         <template slot-scope="scope">
126 126
            <el-form-item  :prop="'tableList.' + scope.$index + '.supply_batch_number'" :rules='tableRules.supply_batch_number'>
127
-             <el-input v-model="scope.row.supply_batch_number" style="width:80px" :disabled="disabled"></el-input>
127
+             <el-input v-model="scope.row.supply_batch_number" style="width:180px" :disabled="disabled" placeholder="请输入批号"></el-input>
128 128
           </el-form-item>
129 129
         </template>
130 130
     </el-table-column>
@@ -142,9 +142,9 @@
142 142
              </el-form-item>
143 143
        </template>
144 144
     </el-table-column>
145
-    <el-table-column label="可用库存" align="center" width="100px">
145
+    <el-table-column label="可用库存" align="center" width="150px">
146 146
         <template slot-scope="scope">
147
-            <el-input v-model="scope.row.supply_total" style="width:80px" :disabled="true"></el-input>
147
+            <el-input v-model="scope.row.supply_total" style="width:100px" :disabled="true"></el-input>
148 148
             <div style="visibility: hidden">/</div>
149 149
         </template>
150 150
     </el-table-column>
@@ -154,14 +154,14 @@
154 154
         </template>
155 155
         <template slot-scope="scope">
156 156
           <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
157
-             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled"></el-input>
157
+             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled" placeholder="请输入数量"></el-input>
158 158
           </el-form-item>
159 159
         </template>
160 160
     </el-table-column>
161 161
 
162
-    <el-table-column label="采购单价" align="center" width="120px">
162
+    <el-table-column label="采购单价" align="center" width="180px">
163 163
         <template slot-scope="scope">
164
-        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
164
+        <el-input v-model="scope.row.supply_price" style="width:140px" :disabled="disabled" placeholder="请输入采购单价"></el-input>
165 165
         <div style="visibility: hidden">/</div>
166 166
         </template>
167 167
     </el-table-column>
@@ -216,7 +216,7 @@
216 216
 
217 217
     <el-table-column label="备注" align="center" width="200px">
218 218
         <template slot-scope="scope">
219
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
219
+        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled" placeholder="请输入备注"></el-input>
220 220
         <div style="visibility: hidden">/</div>
221 221
         </template>
222 222
     </el-table-column>
@@ -243,39 +243,37 @@
243 243
         </template>
244 244
     </el-table-column>
245 245
   </el-table>
246
+   <div style="margin-top: 10px">
247
+      <el-input
248
+        type="textarea"
249
+        :rows="2"
250
+        placeholder="备注信息"
251
+        v-model="return_remark"
252
+      >
253
+      </el-input>
254
+  </div>
246 255
 </el-form>
247 256
    <div style="margin-top:10px">
248 257
       合计:{{getAllPrice()}} 元
249 258
    </div>
250 259
    <div style="margin-top:10px">
251
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
260
+        <span>优惠率:<el-input style="width:150px" v-model="rate_of_concession" placeholder="请输入优惠率"></el-input>%</span>
252 261
 
253
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
262
+        <span>优惠金额:<el-input style="width:150px" v-model="discount_amount" placeholder="请输入优惠金额"></el-input></span>
254 263
       
255
-        <span>本次付款:<el-input style="width:100px" v-model="payment"></el-input></span>
264
+        <span>本次付款:<el-input style="width:150px" v-model="payment" placeholder="请输入本次付款"></el-input></span>
256 265
 
257
-        <span>本次欠款:<el-input style="width:100px" v-model="arrearage"></el-input></span>
266
+        <span>本次欠款:<el-input style="width:150px" v-model="arrearage" placeholder="请输入本次欠款"></el-input></span>
258 267
     </div>
259 268
 </div>
260 269
 
261
-  <!-- <el-dialog
262
-  title="提示"
263
-  :visible.sync="dialogVisible"
264
-  width="30%"
265
-  :before-close="handleClose">
266
-  <span>这是一段信息</span>
267
-  <span slot="footer" class="dialog-footer">
268
-    <el-button @click="dialogVisible = false">取 消</el-button>
269
-    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
270
-  </span>
271
-  </el-dialog> -->
272 270
 </div>
273 271
 </template>
274 272
 
275 273
 <script>
276 274
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
277 275
 import {uParseTime } from '@/utils/tools'
278
-import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList,ModefySupplyWarehousing,MofyGoodOrder,UpdateSupplyWahouseingInfo} from "@/api/supply"
276
+import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList,ModefySupplyWarehousing,MofyGoodOrder,UpdateSupplyWahouseingInfo,getSupplyWarehouseOutById} from "@/api/supply"
279 277
 export default {
280 278
 name: "addPurchaseOrder",
281 279
 components: {
@@ -341,7 +339,7 @@ return {
341 339
    good_number:"",
342 340
    orderInfo:[],
343 341
    warese_out_id:0,
344
-   
342
+   return_remark:"",
345 343
   };
346 344
 },
347 345
 methods:{
@@ -610,6 +608,7 @@ getTimes(time) {
610 608
         this.arrearage = out.arrearage
611 609
         this.number = out.number
612 610
         this.good_number = out.good_number
611
+        this.return_remark = out.return_remake
613 612
         this.start_time = this.getTimes(out.document_date)
614 613
         var orderInfo = response.data.data.list
615 614
         
@@ -693,7 +692,8 @@ getTimes(time) {
693 692
            this.loading = true
694 693
            var warehose_out_id = this.$route.query.id
695 694
            var params = {
696
-             "stockIn":this.recordInfo.tableList,
695
+             stockIn:this.recordInfo.tableList,
696
+             return_remake:this.return_remark,
697 697
            } 
698 698
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
699 699
            if(response.data.state == 1){
@@ -817,6 +817,27 @@ getTimes(time) {
817 817
     })
818 818
   },
819 819
   toClick(){
820
+    //先判断采购单号有没有关联的采购退货单号,如果没有,则为首次生成采购退货单
821
+     if(this.is_check == 2){
822
+      this.$message.error("该采购单未审核,不能生成退货单数据!")
823
+      return false
824
+     }
825
+     var id = this.$route.query.id
826
+    getSupplyWarehouseOutById(id).then(response=>{
827
+      if(response.data.state == 1){
828
+        var cancelList = response.data.data.cancelList
829
+        console.log("cancelList23232232323323223",cancelList)
830
+        if(cancelList.length >0){
831
+
832
+        }
833
+        var outList = response.data.data.outList
834
+        console.log("outList2332232332",outList)
835
+        var cancelOrderList = response.data.data.cancelOrderList
836
+        console.log("cancelOrderList2323322322332",cancelOrderList)
837
+        var drugList = response.data.data.drugList
838
+        console.log("drugList233223232323232",drugList)
839
+      }
840
+    })
820 841
     this.$router.push({path:"/good/return/add?id="+this.id})
821 842
   },
822 843
   //反审核

+ 10 - 4
src/xt_pages/supply/components/editGoodReturn.vue View File

@@ -92,7 +92,7 @@
92 92
                   v-model="scope.row.name"
93 93
                   style="width: 160px"
94 94
                   filterable
95
-                  placeholder="请选择"
95
+                  placeholder="请选择商品"
96 96
                   @change="changeName"
97 97
                   @input="changeGoodName(scope.$index)"
98 98
                   :disabled="disabled"
@@ -117,6 +117,7 @@
117 117
                 v-model="scope.row.supply_type"
118 118
                 style="width: 120px"
119 119
                 :disabled="true"
120
+                placeholder="商品类别"
120 121
               ></el-input>
121 122
             </template>
122 123
           </el-table-column>
@@ -126,6 +127,7 @@
126 127
                 v-model="scope.row.supply_specification_name"
127 128
                 style="width: 150px"
128 129
                 :disabled="true"
130
+                placeholder="规格&单位"
129 131
               ></el-input>
130 132
             </template>
131 133
           </el-table-column>
@@ -168,6 +170,7 @@
168 170
           <el-table-column label="数量" align="center" width="120px">
169 171
             <template slot="header" slot-scope="scope">
170 172
               <span>数量<span style="color: red">*</span></span>
173
+
171 174
             </template>
172 175
             <template slot-scope="scope">
173 176
               <el-form-item
@@ -178,22 +181,24 @@
178 181
                   v-model="scope.row.supply_count"
179 182
                   style="width: 80px"
180 183
                   :disabled="disabled"
184
+                  placeholder="请输入数量"
181 185
                 ></el-input>
182 186
               </el-form-item>
183 187
             </template>
184 188
           </el-table-column>
185 189
 
186
-          <el-table-column label="购货单价" align="center" width="120px">
190
+          <el-table-column label="采购单价" align="center" width="180px">
187 191
             <template slot-scope="scope">
188 192
               <el-input
189 193
                 v-model="scope.row.supply_price"
190
-                style="width: 80px"
194
+                style="width: 140px"
191 195
                 :disabled="disabled"
196
+                placeholder="请输入采购单价"
192 197
               ></el-input>
193 198
             </template>
194 199
           </el-table-column>
195 200
 
196
-          <el-table-column label="购金额" align="center" width="120px">
201
+          <el-table-column label="购金额" align="center" width="120px">
197 202
             <template slot-scope="scope">
198 203
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
199 204
             </template>
@@ -246,6 +251,7 @@
246 251
                 v-model="scope.row.supply_remake"
247 252
                 style="width: 160px"
248 253
                 :disabled="disabled"
254
+                placeholder="请输入备注"
249 255
               ></el-input>
250 256
             </template>
251 257
           </el-table-column>

+ 21 - 26
src/xt_pages/supply/components/editPurchaseOrder.vue View File

@@ -7,8 +7,7 @@
7 7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 8
     <div>
9 9
         <span style="color:red">*</span><span>供应商:</span>
10
-        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
11
-        @change="changeTypeName" :disabled="disabled">
10
+        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择" :disabled="disabled">
12 11
         <el-option
13 12
             v-for="item in supplyList"
14 13
             :key="item.id"
@@ -28,7 +27,6 @@
28 27
         align="right"
29 28
         format="yyyy-MM-dd"
30 29
         value-format="yyyy-MM-dd"
31
-        @change="startTimeChange"
32 30
         :disabled="disabled"
33 31
         ></el-date-picker>
34 32
         <span>交货日期:</span>
@@ -43,7 +41,6 @@
43 41
             align="right"
44 42
             format="yyyy-MM-dd"
45 43
             value-format="yyyy-MM-dd"
46
-            @change="endTimeChange"
47 44
             :disabled="disabled"
48 45
         ></el-date-picker>
49 46
         <span>单据编码:{{number}}</span>
@@ -126,20 +123,20 @@
126 123
             <el-input v-model="scope.row.supply_total" style="width:100px" :disabled="true"></el-input>
127 124
         </template>
128 125
     </el-table-column>
129
-    <el-table-column label="数量" align="center" width="120px">
126
+    <el-table-column label="数量" align="center" width="180px">
130 127
         <template slot="header" slot-scope="scope">
131 128
             <span>数量<span style="color: red">*</span></span>
132 129
         </template>
133 130
         <template slot-scope="scope">
134 131
           <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
135
-             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled" placeholder="请输入数量"></el-input>
132
+             <el-input v-model="scope.row.supply_count" style="width:140px" :disabled="disabled" placeholder="请输入数量"></el-input>
136 133
           </el-form-item>
137 134
         </template>
138 135
     </el-table-column>
139 136
 
140 137
     <el-table-column label="采购单价" align="center" width="120px">
141 138
         <template slot-scope="scope">
142
-        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
139
+        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled" placeholder="请输入采购单价"></el-input>
143 140
         </template>
144 141
     </el-table-column>
145 142
 
@@ -171,7 +168,7 @@
171 168
  
172 169
     <el-table-column label="备注" align="center" width="200px">
173 170
         <template slot-scope="scope">
174
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
171
+        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled" placeholder="请输入备注"></el-input>
175 172
         </template>
176 173
     </el-table-column>
177 174
 
@@ -197,7 +194,15 @@
197 194
         </template>
198 195
     </el-table-column>
199 196
   </el-table>
200
-
197
+  <div style="margin-top: 10px">
198
+        <el-input
199
+          type="textarea"
200
+          :rows="2"
201
+          placeholder="备注信息"
202
+          v-model="return_remark"
203
+        >
204
+        </el-input>
205
+       </div>
201 206
    <!-- 审核水印 -->
202 207
   <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
203 208
 </el-form>
@@ -205,9 +210,9 @@
205 210
       合计:{{getAllPrice()}} 元
206 211
    </div>
207 212
    <div style="margin-top:10px">
208
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession" @input='addressChange' :disabled="disabled"></el-input>%</span>
213
+        <span>优惠率:<el-input style="width:150px" v-model="rate_of_concession" @input='addressChange' :disabled="disabled" placeholder="请输入优惠率"></el-input>%</span>
209 214
 
210
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount" :disabled="disabled"></el-input></span>
215
+        <span>优惠金额:<el-input style="width:150px" v-model="discount_amount" :disabled="disabled" placeholder="请输入优惠金额"></el-input></span>
211 216
 
212 217
     </div>
213 218
 </div>
@@ -293,6 +298,7 @@ return {
293 298
    showTwo:true,
294 299
    showThree:false,
295 300
    orderList:[],
301
+   return_remark:"",
296 302
   };
297 303
 },
298 304
 methods:{
@@ -456,20 +462,6 @@ handleDelete: function(index, row) {
456 462
         this.recordInfo.tableList.splice(index, 1)
457 463
    }
458 464
 },
459
-
460
-changeTypeName(){
461
-
462
-},
463
-startTimeChange(){
464
-
465
-},
466
-endTimeChange(){
467
-
468
-},
469
-search(){
470
-
471
-},
472
-
473 465
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
474 466
     var total = 0
475 467
     var max_str=  ""
@@ -548,7 +540,8 @@ getTimes(time) {
548 540
         var start = this.start_time
549 541
         var end = this.end_time
550 542
         const params = {
551
-        'stockIn': this.recordInfo.tableList
543
+          stockIn: this.recordInfo.tableList,
544
+          return_remake:this.return_remark,
552 545
         }
553 546
         console.log("param23232332",params)  
554 547
        
@@ -603,6 +596,7 @@ getTimes(time) {
603 596
         }
604 597
         this.is_check = info.is_check
605 598
         this.number = info.number
599
+        this.return_remark = info.return_remake
606 600
         this.id = info.id
607 601
         this.supplier_name = info.supplier_id
608 602
         this.rate_of_concession = info.rate_of_concession
@@ -659,6 +653,7 @@ getTimes(time) {
659 653
           } 
660 654
         }
661 655
         console.log("orderINFO23323232",orderInfo)
656
+        this.recordInfo.tableList = []
662 657
         this.recordInfo.tableList = orderInfo
663 658
       }
664 659
     })  

+ 1 - 1
src/xt_pages/supply/goodOrderQuery.vue View File

@@ -107,7 +107,7 @@
107 107
        </el-table-column>
108 108
         <el-table-column label="已付款" align="center">
109 109
          <template slot-scope="scope">
110
-           {{scope.row.payment}}
110
+           <span v-if="scope.row.payment >0">{{scope.row.payment}}</span> 
111 111
          </template>
112 112
        </el-table-column>
113 113
        <el-table-column label="数量" align="center">