浏览代码

修改配置

csx 6 年前
父节点
当前提交
c0e6ef4ea9

+ 19 - 28
src/api/stock.js 查看文件

@@ -251,9 +251,9 @@ export function GetAllGoodInfo(params){
251 251
   })
252 252
 }
253 253
 
254
-export function postWarehouse(params,warehousing_time,manufacturer_id,dealer_id){
254
+export function postWarehouse(params,warehousing_time,manufacturer_id,dealer_id,type){
255 255
   return request({
256
-    url:'/api/stock/warehouse/create?warehousing_time='+warehousing_time+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
256
+    url:'/api/warehouse/create?warehousing_time='+warehousing_time+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id+"&type="+type,
257 257
     method:'post',
258 258
     data:params
259 259
   })
@@ -262,7 +262,7 @@ export function postWarehouse(params,warehousing_time,manufacturer_id,dealer_id)
262 262
 
263 263
 export function getWarehouseList(params){
264 264
   return request({
265
-    url:'/api/stock/warehouse/list',
265
+    url:'/api/warehouse/list',
266 266
     method:'get',
267 267
     params:params
268 268
   })
@@ -270,16 +270,16 @@ export function getWarehouseList(params){
270 270
 
271 271
 export function getWarehouseInfoList(params){
272 272
   return request({
273
-    url:'/api/stock/warehouseinfo/list',
273
+    url:'/api/warehouseinfo/list',
274 274
     method:'get',
275 275
     params:params
276 276
   })
277 277
 }
278 278
 
279 279
 
280
-export function postSalesReturn(params,salesReturnTime,salesReturnTotal,dealer_id,manufacturer_id){
280
+export function postSalesReturn(params,salesReturnTime,salesReturnTotal,dealer_id,manufacturer_id,type){
281 281
   return request({
282
-    url:'/api/warehouse/return?time='+salesReturnTime+"&total="+salesReturnTotal+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id,
282
+    url:'/api/salesreturn/create?time='+salesReturnTime+"&total="+salesReturnTotal+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id+"&type="+type,
283 283
     method:'post',
284 284
     data:params
285 285
   })
@@ -297,7 +297,7 @@ export function getWarehouseInfo(params){
297 297
 
298 298
 export function getSalesReturnList(params){
299 299
   return request({
300
-    url:'/api/return/list',
300
+    url:'/api/salesreturn/list',
301 301
     method:'get',
302 302
     params:params
303 303
   })
@@ -333,9 +333,9 @@ export function getWarehouseOutInfoList(params){
333 333
 }
334 334
 
335 335
 
336
-export function postWarehouseOut(params,warehousing_time,dealer_id,manufacturer_id){
336
+export function postWarehouseOut(params,warehousing_time,dealer_id,manufacturer_id,type){
337 337
   return request({
338
-    url:'/api/warehouseout/create?warehousing_out_time='+warehousing_time+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id,
338
+    url:'/api/warehouseout/create?warehousing_out_time='+warehousing_time+"&dealer_id="+dealer_id+"&manufacturer_id="+manufacturer_id+"&type="+type,
339 339
     method:'post',
340 340
     data:params
341 341
   })
@@ -401,7 +401,7 @@ export function getWarehouseInfoByOrdeNumber(params){
401 401
 
402 402
 export function modifyWarehouseInfo(params){
403 403
   return request({
404
-    url:'/api/stock/warehouse/edit',
404
+    url:'/api/warehouse/edit',
405 405
     method:'post',
406 406
     params:params
407 407
   })
@@ -410,7 +410,7 @@ export function modifyWarehouseInfo(params){
410 410
 
411 411
 export function deleteWarehouseInfo(params){
412 412
   return request({
413
-    url:'/api/stock/warehouse/delete',
413
+    url:'/api/warehouse/delete',
414 414
     method:'post',
415 415
     params:params
416 416
   })
@@ -437,15 +437,6 @@ export function modifyWarehouseOutInfo(params){
437 437
 
438 438
 
439 439
 
440
-export function deleteStockInRecord(params){
441
-  return request({
442
-    url:'/api/warehouse/delete',
443
-    method:'post',
444
-    params:params
445
-  })
446
-}
447
-
448
-
449 440
 export function GetAllConfig(){
450 441
   return request({
451 442
     url:'/api/stock/config',
@@ -465,7 +456,7 @@ export function GetAllGoodInfoByID(params){
465 456
 
466 457
 export function DeleteWarehouseInfoItem(params){
467 458
   return request({
468
-    url:'/api/stock/warehouseinfo/delete',
459
+    url:'/api/warehouseinfo/delete',
469 460
     method:'post',
470 461
     params:params
471 462
 
@@ -476,7 +467,7 @@ export function DeleteWarehouseInfoItem(params){
476 467
 
477 468
 export function EditWarehouse(params,warehousing_time,id){
478 469
   return request({
479
-    url:'/api/stock/warehouse/edit?warehousing_time='+warehousing_time+'&id='+id,
470
+    url:'/api/warehouse/edit?warehousing_time='+warehousing_time+'&id='+id,
480 471
     method:'post',
481 472
     data:params
482 473
   })
@@ -492,7 +483,7 @@ export function getSalesReturnConfig(){
492 483
 
493 484
 export function deleteSalesReturn(params){
494 485
   return request({
495
-    url:'/api/return/delete',
486
+    url:'/api/salesreturn/delete',
496 487
     method:'post',
497 488
     params:params
498 489
   })
@@ -510,14 +501,14 @@ export function getSaleReturnInfoList(params){
510 501
 
511 502
 export function getReturnList(params){
512 503
   return request({
513
-    url:'/api/return/info/list',
504
+    url:'/api/salesreturninfo/list',
514 505
     method:'get',
515 506
     params:params
516 507
   })
517 508
 }
518 509
 export function deleteSalesReturnInfo(params){
519 510
   return request({
520
-    url:'/api/return/info/delete',
511
+    url:'/api/salesreturninfo/delete',
521 512
     method:'post',
522 513
     params:params
523 514
   })
@@ -527,7 +518,7 @@ export function deleteSalesReturnInfo(params){
527 518
 
528 519
 export function editSalesReturnInfo(params,return_time,id){
529 520
   return request({
530
-    url:'/api/return/edit?return_time='+return_time+"&id="+id,
521
+    url:'/api/salesreturn/edit?return_time='+return_time+"&id="+id,
531 522
     method:'post',
532 523
     data:params
533 524
   })
@@ -624,9 +615,9 @@ export function deleteCancelStockInfo(params){
624 615
   })
625 616
 }
626 617
 
627
-export function postCancelStock(params,cancelStockTime,manufacturer_id,dealer_id){
618
+export function postCancelStock(params,cancelStockTime,manufacturer_id,dealer_id,type){
628 619
   return request({
629
-    url:'/api/cancelstock/create?time='+cancelStockTime+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
620
+    url:'/api/cancelstock/create?time='+cancelStockTime+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id+"&type="+type,
630 621
     method:'post',
631 622
     data:params
632 623
   })

+ 1 - 1
src/lang/zh.js 查看文件

@@ -141,7 +141,7 @@ export default {
141 141
     stockOutOrder:"出库单",
142 142
     cancelStockOrder:"出库退库单",
143 143
     otherStockInOrder:"其他入库单",
144
-    otherSalesReturnOrder:"其退货单",
144
+    otherSalesReturnOrder:"其退货单",
145 145
     otherStockOutOrder:"其他出库单",
146 146
     otherCancelStockOrder:"其他出库退库单",
147 147
 

+ 0 - 13
src/xt_pages/stock/Dialog/stockOutDetailDialog.vue 查看文件

@@ -1,13 +0,0 @@
1
-<template>
2
-
3
-</template>
4
-
5
-<script>
6
-    export default {
7
-        name: "stock-out-detail-dialog"
8
-    }
9
-</script>
10
-
11
-<style scoped>
12
-
13
-</style>

+ 0 - 256
src/xt_pages/stock/Dialog/stockOutDialog.vue 查看文件

@@ -1,256 +0,0 @@
1
-<template>
2
-  <el-dialog :title="propForm.title" :visible.sync="visibility" :show-close="isClose" :close-on-click-modal="isClose"
3
-             :close-on-press-escape="isClose">
4
-
5
-    <el-form :model="propForm.formValue" class="demo-form-inline" style="height: 300px"
6
-             :rules="rules" :v-model="propForm.formValue" ref="formValue"
7
-             label-width="140px">
8
-      <el-col :span="size">
9
-        <el-form-item label="物品类型:" prop="good_type_id">
10
-          <el-select v-model="propForm.formValue.good_type_id" placeholder="请选择" @change="goodTypeSelect"
11
-          >
12
-            <el-option
13
-              v-for="item in tempGoodType"
14
-              :key="item.id"
15
-              :label="item.type_name"
16
-              :value="item.id">
17
-            </el-option>
18
-          </el-select>
19
-        </el-form-item>
20
-      </el-col>
21
-
22
-
23
-      <el-col :span="size">
24
-        <el-form-item label="规格名称:" prop="good_id">
25
-          <el-select v-model="propForm.formValue.good_id" placeholder="请选择" @change="goodInfoSelect">
26
-            <el-option
27
-              v-for="item in tempGoodInfo"
28
-              :key="item.id"
29
-              :label="item.specification_name"
30
-              :value="item.id">
31
-            </el-option>
32
-          </el-select>
33
-        </el-form-item>
34
-      </el-col>
35
-
36
-      <el-col :span="size">
37
-        <el-form-item label="库存数量:">
38
-          <el-input type="number" v-model="warehouse_count" :disabled="isDisabled"></el-input>
39
-        </el-form-item>
40
-      </el-col>
41
-
42
-
43
-      <el-col :span="size">
44
-        <el-form-item label="出库数量:" prop="count">
45
-          <el-input type="number" v-model="propForm.formValue.count"></el-input>
46
-        </el-form-item>
47
-      </el-col>
48
-
49
-      <el-col>
50
-        <el-form-item label="备注 : " prop="remark">
51
-          <el-input type="textarea" :row="5" v-model="propForm.formValue.remark"
52
-                    placeholder="请输入内容">
53
-          </el-input>
54
-        </el-form-item>
55
-      </el-col>
56
-    </el-form>
57
-
58
-
59
-    <span slot="footer" class="dialog-footer">
60
-    <el-button v-if="propForm.isCreated == 3" @click="cancle('formValue')">取 消</el-button>
61
-    <el-button v-if="propForm.isCreated != 3 " @click="cancle('formValue')">取 消</el-button>
62
-    <el-button v-if="propForm.isCreated != 3" type="primary" @click="comfirm('formValue')">确 定</el-button>
63
-  </span>
64
-  </el-dialog>
65
-
66
-</template>
67
-
68
-<script>
69
-  import {
70
-    GetAllGoodInfo,
71
-    GetAllGoodType,
72
-    getWarehouseInfoCountByGoodId,
73
-    getWarehouseInfoByGoodTypeId,
74
-  } from "@/api/stock";
75
-
76
-  export default {
77
-    name: "stockOutDialog",
78
-    data() {
79
-      var checkCount = (rule, value, callback) => {
80
-        if (parseInt(value) > this.warehouse_count) {
81
-          return callback(new Error('出库数量不能大于库存数量'));
82
-        }
83
-        if (value < 0) {
84
-          return callback(new Error('出库数量不能为负数'));
85
-        }
86
-
87
-      };
88
-
89
-
90
-      return {
91
-        remark:'',
92
-        isDisabled: true,
93
-        warehouse_count: '',
94
-        tempGoodType: [],
95
-        tempGoodInfo: [],
96
-        isClose: false,
97
-        size: 11,
98
-        isShow: true,
99
-        rules: {
100
-          good_id: [
101
-            {required: true, message: '请选择物品类型', trigger: 'change'}
102
-          ],
103
-          good_type_id: [
104
-            {required: true, message: '请选择规格名称', trigger: 'change'}
105
-          ],
106
-          count: [
107
-            {required: true, message: '请输入出库数量', trigger: 'blur'},
108
-            {validator: checkCount, trigger: 'blur'},
109
-            // {validator: checkIsInt, trigger: 'blur'}
110
-
111
-          ]
112
-        }
113
-      }
114
-    },
115
-    props: {
116
-      propForm: {
117
-        type: Object
118
-      },
119
-      visibility: {
120
-        type: Boolean,
121
-        default: false
122
-      },
123
-
124
-    },
125
-    methods: {
126
-
127
-      cancle: function (formName) {
128
-        this.$emit('dialog-cancle', this.getValue());
129
-        this.$refs[formName].resetFields();
130
-      },
131
-      comfirm: function (formName) {
132
-        // this.$refs[formName].validate((valid) => {
133
-        //   if (valid) {
134
-        this.$emit('dialog-comfirm', this.getValue());
135
-
136
-        // }
137
-        // });
138
-      },
139
-      getValue: function () {
140
-        console.log(this.remark)
141
-        let form = {}
142
-        form['good_type_id'] = this.propForm.formValue.good_type_id
143
-        form['good_id'] = this.propForm.formValue.good_id
144
-        form['product_date'] = this.propForm.formValue.product_date
145
-        form['expiry_date'] = this.propForm.formValue.expiry_date
146
-        form['warehousing_count'] = this.warehouse_count
147
-        form['count'] = this.propForm.formValue.count
148
-        form['price'] = this.propForm.formValue.price
149
-        if(typeof this.propForm.formValue.remark == 'undefined'){
150
-          form['remark'] = this.remark
151
-        }else{
152
-          form['remark'] = this.propForm.formValue.remark
153
-
154
-        }
155
-        form['isCreated'] = this.propForm.isCreated
156
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
157
-          if (this.propForm.goodInfo[i].id == this.propForm.formValue.good_id) {
158
-            form['dealer'] = this.propForm.goodInfo[i].dealer
159
-            form['manufacturer'] = this.propForm.goodInfo[i].manufacturer
160
-          }
161
-        }
162
-        return form
163
-      }, goodTypeSelect: function (id) {
164
-        this.propForm.formValue.good_id = ''
165
-
166
-        this.tempGoodInfo = []
167
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
168
-          if (this.propForm.goodInfo[i].good_type_id == id) {
169
-            this.tempGoodInfo.push(this.propForm.goodInfo[i])
170
-          }
171
-        }
172
-        let params = {
173
-          "good_type_id": id
174
-        }
175
-        getWarehouseInfoByGoodTypeId(params).then(response => {
176
-          if (response.data.state == 0) {
177
-            this.warehouse_count = ''
178
-            this.tempGoodInfo = []
179
-            this.$message.error(response.data.msg);
180
-            return false;
181
-          } else {
182
-            this.warehouse_count = ''
183
-
184
-          }
185
-        })
186
-
187
-      }, goodInfoSelect: function (id) {
188
-        let index = 0;
189
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
190
-          if (this.propForm.goodInfo[i].id == id) {
191
-            index = i
192
-          }
193
-        }
194
-        this.propForm.formValue.good_type_id = this.propForm.goodInfo[index].good_type_id
195
-        let params = {
196
-          "good_id": this.propForm.goodInfo[index].id
197
-
198
-        }
199
-        getWarehouseInfoCountByGoodId(params).then(response => {
200
-          if (response.data.state == 0) {
201
-            this.warehouse_count = ''
202
-            this.propForm.formValue.good_type_id = ''
203
-            this.$message.error(response.data.msg);
204
-
205
-            return false;
206
-          } else {
207
-            this.warehouse_count = ''
208
-            this.warehouse_count = response.data.data.warehousing_count
209
-            this.propForm.formValue.price = response.data.data.price
210
-          }
211
-        })
212
-      }
213
-    },
214
-    watch: {
215
-      visibility(val) {
216
-
217
-        this.tempGoodInfo = this.propForm.goodInfo
218
-        this.tempGoodType = this.propForm.goodType
219
-        if(this.propForm.isCreated == 2 ||this.propForm.isCreated == 3) {
220
-          let params = {
221
-            "good_id": this.propForm.formValue.good_id
222
-          }
223
-          getWarehouseInfoCountByGoodId(params).then(response => {
224
-            if (response.data.state == 0) {
225
-              this.warehouse_count = ''
226
-              this.propForm.formValue.good_type_id = ''
227
-              this.$message.error(response.data.msg);
228
-
229
-              return false;
230
-            } else {
231
-              this.warehouse_count = ''
232
-              this.warehouse_count = response.data.data.warehousing_count
233
-              this.propForm.formValue.price = response.data.data.price
234
-            }
235
-          })
236
-        }else{
237
-          this.warehouse_count = ''
238
-
239
-
240
-        }
241
-
242
-
243
-        !val && setTimeout(() => {
244
-          this.$refs['formValue'].resetFields();
245
-
246
-
247
-        }, 0);
248
-      }
249
-    }
250
-  }
251
-
252
-</script>
253
-
254
-<style scoped>
255
-
256
-</style>

+ 3 - 1
src/xt_pages/stock/cancelStockOrder.vue 查看文件

@@ -156,6 +156,7 @@
156 156
     },
157 157
     data() {
158 158
       return {
159
+        type:1,
159 160
         page: 1,
160 161
         limit: 7,
161 162
         checked: false,
@@ -185,7 +186,8 @@
185 186
           page: this.page,
186 187
           limit: this.limit,
187 188
           start_time: this.start_time,
188
-          end_time: this.end_time
189
+          end_time: this.end_time,
190
+          type: this.type,
189 191
         }
190 192
         this.cancelStockDate = []
191 193
         getCancelStockList(Params).then(response => {

+ 2 - 1
src/xt_pages/stock/cancelStockOrderAdd.vue 查看文件

@@ -137,6 +137,7 @@
137 137
 
138 138
     data() {
139 139
       return {
140
+        type:2,
140 141
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141 142
         return_time: '',
142 143
         currentIndex: 0,
@@ -321,7 +322,7 @@
321 322
             const params = {
322 323
               'cancelStock': this.recordInfo.recordData
323 324
             }
324
-            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer).then(response=>{
325
+            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer,this.type).then(response=>{
325 326
               if (response.data.state==0) {
326 327
                 this.$message.error(response.data.msg);
327 328
                 return false;

+ 0 - 383
src/xt_pages/stock/cancelStockRecord.vue 查看文件

@@ -1,383 +0,0 @@
1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-
6
-    <div class="filter-container">
7
-      <span>出库退库:</span>
8
-      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
9
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
10
-                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
11
-      <span class="">-</span>
12
-      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
13
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
14
-                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
15
-      <el-row style="float:right;">
16
-        <el-button @click="handleBack">返回</el-button>
17
-      </el-row>
18
-
19
-    </div>
20
-
21
-
22
-    <el-row :gutter="12">
23
-      <el-col :span="8">
24
-        <div class="title">出库退库记录
25
-        </div>
26
-        <div style="margin-bottom: 10px;">
27
-        </div>
28
-        <el-table :data="cancelStock.cancelStockDate" :class="signAndWeighBoxPatients" style="width: 100%" border
29
-                  @row-click="onRowClick"
30
-                  :row-class-name="tableRowClassName"
31
-                  highlight-current-row
32
-                  v-loading="cancelStock.loading"
33
-        >
34
-          <el-table-column label="退库单号" min-width="40" align="center">
35
-            <template slot-scope="scope">
36
-              {{scope.row.order_number}}
37
-
38
-            </template>
39
-          </el-table-column>
40
-          <el-table-column label="操作时间" min-width="40" align="center">
41
-            <template slot-scope="scope">
42
-              {{ scope.row.opera_time | parseTime("{y}-{m}-{d}")}}
43
-            </template>
44
-          </el-table-column>
45
-          <el-table-column label="退库总量" align="center" min-width="30">
46
-            <template slot-scope="scope">
47
-              {{scope.row.total}}
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="操作人" align="center" min-width="30">
52
-            <template slot-scope="scope">
53
-              {{getXuserName(scope.row.creater)}}
54
-            </template>
55
-          </el-table-column>
56
-
57
-
58
-        </el-table>
59
-
60
-
61
-        <el-pagination
62
-          @size-change="handleSizeChange"
63
-          @current-change="handleCurrentChange"
64
-          :page-sizes="[7]"
65
-          :page-size="7"
66
-          background
67
-          style="margin-top:20px;"
68
-          layout="total, sizes, prev, pager, next, jumper"
69
-          :total="total">
70
-        </el-pagination>
71
-      </el-col>
72
-
73
-      <el-col :span="16">
74
-        <div class="title">物品详细信息
75
-        </div>
76
-        <el-table :data="cancelStockInfo.cancelStockInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
77
-                  v-loading="cancelStockInfo.loading"
78
-                  @selection-change="handleSelectionChange"
79
-        >
80
-          <el-table-column
81
-            type="selection"
82
-            width="55">
83
-          </el-table-column>
84
-          <el-table-column label="规格名称" min-width="30" align="center">
85
-            <template slot-scope="scope">
86
-              {{getSpecificationName(scope.row.good_id)}}
87
-            </template>
88
-          </el-table-column>
89
-          <el-table-column label="物品类型" min-width="30" align="center">
90
-            <template slot-scope="scope">
91
-              {{getTypeName(scope.row.good_type_id)}}
92
-
93
-            </template>
94
-          </el-table-column>
95
-
96
-          <el-table-column label="退库数量" min-width="30" align="center">
97
-            <template slot-scope="scope">
98
-              {{scope.row.count}}
99
-            </template>
100
-          </el-table-column>
101
-          <el-table-column label="退库单价" min-width="30" align="center">
102
-            <template slot-scope="scope">
103
-              {{scope.row.price}}
104
-
105
-            </template>
106
-          </el-table-column>
107
-          <el-table-column label="退库总价" min-width="30" align="center">
108
-            <template slot-scope="scope">
109
-              {{scope.row.price * scope.row.count }}
110
-            </template>
111
-          </el-table-column>
112
-        </el-table>
113
-
114
-      </el-col>
115
-    </el-row>
116
-  </div>
117
-</template>
118
-
119
-<script>
120
-  import {uParseTime} from "@/utils/tools";
121
-  import { fetchAllDoctorAndNurse,fetchAllAdminUsers } from "@/api/doctor";
122
-  import {
123
-    getCancelStockList,
124
-    getCancelStockInfoList,
125
-    GetAllGoodInfo,
126
-    GetAllGoodType,
127
-  } from "@/api/stock";
128
-
129
-  export default {
130
-    name: "stockIn",
131
-    created(){
132
-      var year = new Date().getFullYear();
133
-      var month = new Date().getMonth() + 1;
134
-      var day = new Date().getDate();
135
-      if (parseInt(month) < 10) {
136
-        month = "0" + month;
137
-      }
138
-      if (parseInt(day) < 10) {
139
-        day = "0" + day;
140
-      }
141
-      let endTime = year + '-' + month + '-' + day;
142
-      this.end_time = endTime
143
-
144
-
145
-      var year = new Date().getFullYear();
146
-      var month = new Date().getMonth();
147
-      var day = new Date().getDate();
148
-      if (parseInt(month) < 10) {
149
-        month = "0" + month;
150
-      }
151
-      if (parseInt(day) < 10) {
152
-        day = "0" + day;
153
-      }
154
-      let startTime = year + '-' + month + '-' + day;
155
-      this.start_time = startTime
156
-
157
-      this.GetAllGoodInfo()
158
-      this.GetAllGoodType()
159
-      this.GetCancelStockList()
160
-      this.fetchAllAdminUsers()
161
-
162
-    },
163
-    data() {
164
-      return {
165
-        adminUserOptions:[],
166
-        multipleSelection: [],
167
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
168
-        start_time: '',
169
-        end_time: '',
170
-        goodType:[],
171
-        goodInfo:[],
172
-
173
-        cancelStock: {
174
-          loading: false,
175
-          cancelStockDate: [],
176
-          tableCurrentIndex:''
177
-        },
178
-
179
-        cancelStockInfo: {
180
-          loading: false,
181
-          cancelStockInfoDate: [],
182
-        },
183
-
184
-      };
185
-    },
186
-    methods: {
187
-      GetCancelStockList:function () {
188
-        let Params = {
189
-          page: this.page,
190
-          limit: this.limit,
191
-          start_time: this.start_time,
192
-          end_time: this.end_time
193
-        }
194
-        this.cancelStock.cancelStockDate = []
195
-        getCancelStockList(Params).then(response =>{
196
-          if (response.data.state == 0) {
197
-            this.cancelStock.loading = false
198
-            this.$message.error(response.data.msg);
199
-            return false;
200
-          } else {
201
-            this.cancelStock.loading = false
202
-            this.total = response.data.data.total
203
-
204
-            for (let i = 0; i < response.data.data.list.length; i++) {
205
-              this.cancelStock.cancelStockDate.push(response.data.data.list[i])
206
-            }
207
-          }
208
-        })
209
-      },  tableRowClassName({row, rowIndex}) {
210
-        //把每一行的索引放进row
211
-        row.index = rowIndex;
212
-
213
-      }, onRowClick(row, event, column) {
214
-        this.cancelStockInfo.cancelStockInfoDate = []
215
-        this.cancelStock.tableCurrentIndex = row.index;
216
-        let params = {
217
-          'id': row.id
218
-        }
219
-        this.cancelStockInfo.loading = true
220
-        getCancelStockInfoList(params).then(response => {
221
-          if (response.data.state == 0) {
222
-            this.cancelStockInfo.loading = false
223
-            this.$message.error(response.data.msg);
224
-            return false;
225
-          } else {
226
-            this.cancelStockInfo.loading = false
227
-            for (let i = 0; i < response.data.data.info.length; i++) {
228
-              this.cancelStockInfo.cancelStockInfoDate.push(response.data.data.info[i])
229
-            }
230
-          }
231
-        });
232
-
233
-      },getXuserName(id){
234
-        if (id<=0) {
235
-          return "";
236
-        }
237
-        var name = "";
238
-        if (this.adminUserOptions==null || typeof(this.adminUserOptions.length) == "undefined") {
239
-          return name;
240
-        }
241
-        var leng = this.adminUserOptions.length;
242
-        if (leng==0) {
243
-          return name;
244
-        }
245
-        for (let index = 0; index < leng; index++) {
246
-          if (this.adminUserOptions[index].id == id) {
247
-            name = this.adminUserOptions[index].name;
248
-            break;
249
-          }
250
-        }
251
-        return name;
252
-      },fetchAllDoctorAndNurse() {
253
-        fetchAllDoctorAndNurse().then(response => {
254
-          if (response.data.state == 1) {
255
-            this.doctorOptions = response.data.data.doctors;
256
-          }
257
-        });
258
-      },
259
-      fetchAllAdminUsers() {
260
-        fetchAllAdminUsers().then(response => {
261
-          if (response.data.state == 1) {
262
-            this.adminUserOptions = response.data.data.users;
263
-            var alen = this.adminUserOptions.length;
264
-            for (let index = 0; index < alen; index++) {
265
-              if (this.adminUserOptions[index].user_type==2) {
266
-                this.doctorOptions.push(this.adminUserOptions[index]);
267
-              }
268
-            }
269
-          }
270
-        });
271
-      },getSpecificationName:function (id) {
272
-        let name = ''
273
-        for (let i = 0; i< this.goodInfo.length; i++){
274
-          if( this.goodInfo[i].id == id){
275
-            name = this.goodInfo[i].specification_name
276
-          }
277
-
278
-        }
279
-
280
-        return name
281
-
282
-      },getTypeName:function (id) {
283
-        let name = ''
284
-        for (let i = 0; i< this.goodType.length; i++){
285
-          if( this.goodType[i].id == id){
286
-            name = this.goodType[i].type_name
287
-          }
288
-        }
289
-        return name
290
-      },GetAllGoodType:function () {
291
-        GetAllGoodType().then(response => {
292
-          if (response.data.state == 0) {
293
-            this.$message.error(response.data.msg);
294
-            return false;
295
-          } else {
296
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
297
-              this.goodType.push(response.data.data.goodType[i])
298
-            }
299
-          }
300
-        });
301
-
302
-
303
-      },GetAllGoodInfo:function () {
304
-        GetAllGoodInfo().then(response => {
305
-          if (response.data.state == 0) {
306
-            this.$message.error(response.data.msg);
307
-            return false;
308
-          } else {
309
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
310
-              this.goodInfo.push(response.data.data.goodInfo[i])
311
-            }
312
-          }
313
-        });
314
-
315
-
316
-      },handleSelectionChange:function (val) {
317
-        this.multipleSelection = val
318
-      },handleBack: function () {
319
-        this.$router.go(-1)
320
-      },startTimeChange(val) {
321
-      this.GetWarehouse();
322
-    }, endTimeChange(val) {
323
-      this.GetWarehouse();
324
-    }
325
-
326
-
327
-    },
328
-    watch: {
329
-      $route() {
330
-        if (this.$route.path == '/stock/in') {
331
-
332
-
333
-        }
334
-
335
-      }
336
-    }
337
-  };
338
-</script>
339
-
340
-<style rel="stylesheet/css" lang="scss" scoped>
341
-  .information {
342
-    border: 1px #dcdfe6 solid;
343
-    padding: 30px 20px 30px 20px;
344
-
345
-    .border {
346
-      border-bottom: 1px #dcdfe6 solid;
347
-      margin: 0px 0 20px 0;
348
-    }
349
-  }
350
-
351
-  .title {
352
-    background: #409eff;
353
-    height: 44px;
354
-    line-height: 44px;
355
-    padding: 0 0 0 10px;
356
-    color: #fff;
357
-    margin: 0 0 10px 0;
358
-    // border-radius: 4px 4px 0 0;
359
-  }
360
-
361
-  .edit_separater {
362
-    border-top: 1px solid rgb(233, 233, 233);
363
-    margin-top: 15px;
364
-    margin-bottom: 15px;
365
-  }
366
-
367
-</style>
368
-
369
-<style>
370
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
371
-    font-size: 12px;
372
-  }
373
-
374
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
375
-    background: #6fb5fa;
376
-  }
377
-
378
-  .count{
379
-    color: #bd2c00;
380
-
381
-  }
382
-
383
-</style>

+ 3 - 1
src/xt_pages/stock/otherCancelStockOrder.vue 查看文件

@@ -156,6 +156,7 @@
156 156
     },
157 157
     data() {
158 158
       return {
159
+        type: 2,
159 160
         page: 1,
160 161
         limit: 7,
161 162
         checked: false,
@@ -185,7 +186,8 @@
185 186
           page: this.page,
186 187
           limit: this.limit,
187 188
           start_time: this.start_time,
188
-          end_time: this.end_time
189
+          end_time: this.end_time,
190
+          type: this.type,
189 191
         }
190 192
         this.cancelStockDate = []
191 193
         getCancelStockList(Params).then(response => {

+ 2 - 1
src/xt_pages/stock/otherCancelStockOrderAdd.vue 查看文件

@@ -140,6 +140,7 @@
140 140
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141 141
         return_time: '',
142 142
         currentIndex: 0,
143
+        type:2,
143 144
         recordInfo: {
144 145
           recordData: [],
145 146
         },
@@ -321,7 +322,7 @@
321 322
             const params = {
322 323
               'cancelStock': this.recordInfo.recordData
323 324
             }
324
-            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer).then(response=>{
325
+            postCancelStock(params,this.return_time,this.form.manufacturer,this.form.dealer,this.type).then(response=>{
325 326
               if (response.data.state==0) {
326 327
                 this.$message.error(response.data.msg);
327 328
                 return false;

+ 3 - 1
src/xt_pages/stock/otherSalesReturnOrder.vue 查看文件

@@ -158,6 +158,7 @@
158 158
     },
159 159
     data() {
160 160
       return {
161
+        type:2,
161 162
         page: 1,
162 163
         limit: 7,
163 164
         checked: false,
@@ -187,7 +188,8 @@
187 188
           page: this.page,
188 189
           limit: this.limit,
189 190
           start_time: this.start_time,
190
-          end_time: this.end_time
191
+          end_time: this.end_time,
192
+          type: this.type,
191 193
         }
192 194
         this.saleReturnDate = []
193 195
         getSalesReturnList(Params).then(response => {

+ 2 - 1
src/xt_pages/stock/otherSalesReturnOrderAdd.vue 查看文件

@@ -140,6 +140,7 @@
140 140
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141 141
         return_time: '',
142 142
         currentIndex: 0,
143
+        type:2,
143 144
         recordInfo: {
144 145
           recordData: [],
145 146
         },
@@ -326,7 +327,7 @@
326 327
             const params = {
327 328
               'salesReturn': this.recordInfo.recordData
328 329
             }
329
-            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer).then(response=>{
330
+            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
330 331
               if (response.data.state==0) {
331 332
                 this.$message.error(response.data.msg);
332 333
                 return false;

+ 3 - 1
src/xt_pages/stock/otherStockInOrder.vue 查看文件

@@ -176,6 +176,7 @@
176 176
         manufacturer: [],
177 177
         selectedTableData: [],
178 178
         dealer: [],
179
+        type: 2,
179 180
         Warehouse: {
180 181
           loading: false,
181 182
           warehouseDate: [],
@@ -194,7 +195,8 @@
194 195
           page: this.page,
195 196
           limit: this.limit,
196 197
           start_time: this.start_time,
197
-          end_time: this.end_time
198
+          end_time: this.end_time,
199
+          type : this.type,
198 200
         }
199 201
         this.Warehouse.warehouseDate = []
200 202
         getWarehouseList(Params).then(response => {

+ 3 - 1
src/xt_pages/stock/otherStockInOrderAdd.vue 查看文件

@@ -246,6 +246,8 @@
246 246
         expiry_date: '',
247 247
         numbers: '',
248 248
 
249
+        type: 2,
250
+
249 251
         // prop
250 252
         isVisibility: false,
251 253
         propForm: {
@@ -517,7 +519,7 @@
517 519
             const params = {
518 520
               'stockIn': this.recordInfo.recordData
519 521
             }
520
-            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer).then(response => {
522
+            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer,this.type).then(response => {
521 523
               if (response.data.state == 0) {
522 524
                 this.$message.error(response.data.msg)
523 525
                 return false

+ 15 - 2
src/xt_pages/stock/otherStockOutDetail.vue 查看文件

@@ -1,11 +1,24 @@
1 1
 <template>
2
-
2
+  <other-stock-out-order-detail v-if="isEdit == 0"   v-on:edit-record="isEdit = 1"></other-stock-out-order-detail>
3
+  <other-stock-out-order-edit v-else></other-stock-out-order-edit>
3 4
 </template>
4 5
 
5 6
 <script>
7
+  import StockOutOrderDetail from './stockOutOrderDetail'
8
+  import StockOutEdit from './stockOutOrderEdit'
9
+  import OtherStockOutOrderEdit from './otherStockOutOrderEdit'
10
+  import OtherStockOutOrderDetail from './otherStockOutOrderDetail'
6 11
   export default {
7
-    name: 'otherStockOutDetail'
12
+    name: 'otherStockOutDetail',
13
+    components: { OtherStockOutOrderDetail, OtherStockOutOrderEdit, StockOutEdit, StockOutOrderDetail},
14
+    data() {
15
+      return {
16
+        isEdit: 0
17
+      }
18
+    }
19
+
8 20
   }
21
+
9 22
 </script>
10 23
 
11 24
 <style scoped>

+ 397 - 2
src/xt_pages/stock/otherStockOutOrder.vue 查看文件

@@ -1,13 +1,408 @@
1 1
 <template>
2 2
 
3
+  <div class="app-container sign-and-weigh-box">
4
+
5
+
6
+    <div class="filter-container">
7
+
8
+
9
+      <el-row style="float:right;">
10
+        <el-button @click="AddNewOrder" type="primary">新增</el-button>
11
+      </el-row>
12
+    </div>
13
+
14
+    <div class="filter-container" style="margin-top:20px">
15
+      <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
16
+      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
+    </div>
18
+
19
+    <div class="filter-container">
20
+      <span>入库时间:</span>
21
+      <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
+                      value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
+      <span class="">-</span>
25
+      <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
+                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
+                      value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
+    </div>
29
+
30
+    <div class="filter-container" style="margin-top: 10px">
31
+      <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
32
+      <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
33
+
34
+    </div>
35
+
36
+    <el-row :gutter="12" style="margin-top: 10px">
37
+      <el-table
38
+        :data="warehouseOutDate"
39
+        :class="signAndWeighBoxPatients"
40
+        style="width: 100%" border
41
+        highlight-current-row
42
+        ref="multipleTable"
43
+        @selection-change="select"
44
+
45
+      >
46
+        <el-table-column
47
+          type="selection"
48
+          width="55">
49
+        </el-table-column>
50
+
51
+        <el-table-column label="单据日期" align="center">
52
+          <template slot-scope="scope">
53
+            {{ scope.row.warehouse_out_time | parseTime('{y}-{m}-{d}')}}
54
+          </template>
55
+        </el-table-column>
56
+
57
+        <el-table-column label="单据编号" align="center">
58
+          <template slot-scope="scope">
59
+            {{scope.row.warehouse_out_order_number}}
60
+          </template>
61
+        </el-table-column>
62
+
63
+        <el-table-column label="制单人" align="center">
64
+          <template slot-scope="scope">
65
+            {{getXuserName(scope.row.creater)}}
66
+          </template>
67
+        </el-table-column>
68
+
69
+
70
+        <el-table-column label="厂家" align="center">
71
+          <template slot-scope="scope">
72
+            {{getManufactuerName(scope.row.manufacturer)}}
73
+          </template>
74
+        </el-table-column>
75
+
76
+        <el-table-column label="经销商" align="center">
77
+          <template slot-scope="scope">
78
+            {{getDealerName(scope.row.dealer)}}
79
+          </template>
80
+        </el-table-column>
81
+
82
+        <el-table-column label="操作" align="center">
83
+          <template slot-scope="scope">
84
+            <el-button
85
+              size="mini"
86
+              type="primary"
87
+              icon="el-icon-edit"
88
+              @click="handleEdit(scope.$index, scope.row)">
89
+            </el-button>
90
+
91
+            <el-button
92
+              size="mini"
93
+              type="danger"
94
+              icon="el-icon-delete"
95
+              @click="handleDelete(scope.$index, scope.row)">
96
+            </el-button>
97
+
98
+          </template>
99
+        </el-table-column>
100
+
101
+      </el-table>
102
+
103
+      <el-pagination
104
+        @size-change="handleSizeChange"
105
+        @current-change="handleCurrentChange"
106
+        :page-sizes="[7]"
107
+        :page-size="7"
108
+        background
109
+        style="margin-top:20px;float: right"
110
+        layout="total, sizes, prev, pager, next, jumper"
111
+        :total="total">
112
+      </el-pagination>
113
+
114
+    </el-row>
115
+  </div>
3 116
 </template>
4 117
 
5 118
 <script>
119
+  import { uParseTime } from '@/utils/tools'
120
+  import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
121
+  import {
122
+    deleteWarehouseOut,
123
+    GetAllConfig,
124
+    getWarehouseOutList,
125
+  } from '@/api/stock'
126
+
6 127
   export default {
7
-    name: 'otherStockOutOrder'
128
+    name: 'otherStockOutOrder',
129
+    created() {
130
+      var year = new Date().getFullYear()
131
+      var month = new Date().getMonth() + 1
132
+      var day = new Date().getDate()
133
+      if (parseInt(month) < 10) {
134
+        month = '0' + month
135
+      }
136
+      if (parseInt(day) < 10) {
137
+        day = '0' + day
138
+      }
139
+      const endTime = year + '-' + month + '-' + day
140
+      this.end_time = endTime
141
+
142
+      var year = new Date().getFullYear()
143
+      var month = new Date().getMonth()
144
+      var day = new Date().getDate()
145
+      if (parseInt(month) < 10) {
146
+        month = '0' + month
147
+      }
148
+      if (parseInt(day) < 10) {
149
+        day = '0' + day
150
+      }
151
+      const startTime = year + '-' + month + '-' + day
152
+      this.start_time = startTime
153
+      this.GetWarehouseOut()
154
+      this.GetConfigInfo()
155
+      this.fetchAllAdminUsers()
156
+    },
157
+    data() {
158
+      return {
159
+        page: 1,
160
+        limit: 7,
161
+        checked: false,
162
+        total: 0,
163
+        pageTotal: 0,
164
+        pageSelect: 0,
165
+        adminUserOptions: [],
166
+        multipleSelection: [],
167
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
168
+        start_time: '',
169
+        warehouseOutDate: [],
170
+        end_time: '',
171
+        goodType: [],
172
+        goodInfo: [],
173
+        manufacturer: [],
174
+        selectedTableData: [],
175
+        dealer: [],
176
+        type:2,
177
+
178
+      }
179
+    },
180
+    methods: {
181
+      AddNewOrder:function(){
182
+        this.$router.push({ name: 'stockOutOrderAdd'})
183
+      },
184
+      GetWarehouseOut: function() {
185
+        const Params = {
186
+          page: this.page,
187
+          limit: this.limit,
188
+          start_time: this.start_time,
189
+          end_time: this.end_time,
190
+          type: this.type,
191
+        }
192
+        this.warehouseOutDate = []
193
+        getWarehouseOutList(Params).then(response => {
194
+          if (response.data.state == 0) {
195
+            this.$message.error(response.data.msg)
196
+            return false
197
+          } else {
198
+            this.total = response.data.data.total
199
+            for (let i = 0; i < response.data.data.list.length; i++) {
200
+              this.warehouseOutDate.push(response.data.data.list[i])
201
+            }
202
+          }
203
+        })
204
+      }, getXuserName(id) {
205
+        if (id <= 0) {
206
+          return ''
207
+        }
208
+        var name = ''
209
+        if (this.adminUserOptions == null || typeof (this.adminUserOptions.length) === 'undefined') {
210
+          return name
211
+        }
212
+        var leng = this.adminUserOptions.length
213
+        if (leng == 0) {
214
+          return name
215
+        }
216
+        for (let index = 0; index < leng; index++) {
217
+          if (this.adminUserOptions[index].id == id) {
218
+            name = this.adminUserOptions[index].name
219
+            break
220
+          }
221
+        }
222
+        return name
223
+      }, fetchAllAdminUsers() {
224
+        fetchAllAdminUsers().then(response => {
225
+          console.log(response)
226
+          if (response.data.state == 1) {
227
+            this.adminUserOptions = response.data.data.users
228
+            var alen = this.adminUserOptions.length
229
+            for (let index = 0; index < alen; index++) {
230
+              if (this.adminUserOptions[index].user_type == 2) {
231
+                // this.doctorOptions.push(this.adminUserOptions[index]);
232
+              }
233
+            }
234
+          }
235
+        })
236
+      }, handleSelectionChange: function(val) {
237
+        this.multipleSelection = val
238
+      }, handleSizeChange(val) {
239
+        this.limit = val
240
+        this.GetWarehouse()
241
+      }, handleCurrentChange(val) {
242
+        this.page = val
243
+        this.GetWarehouse()
244
+      }, startTimeChange(val) {
245
+        this.GetWarehouse()
246
+      }, endTimeChange(val) {
247
+        this.GetWarehouse()
248
+      }, calculate: function(val) {
249
+        return Math.round(parseFloat(val) * 100) / 100
250
+      }, GetConfigInfo: function() {
251
+        GetAllConfig().then(response => {
252
+          if (response.data.state == 0) {
253
+            this.$message.error(response.data.msg)
254
+            return false
255
+          } else {
256
+            this.manufacturer = response.data.data.manufacturer
257
+            this.dealer = response.data.data.dealer
258
+          }
259
+        })
260
+      }, getManufactuerName: function(manufacturer_id) {
261
+        for (let i = 0; i < this.manufacturer.length; i++) {
262
+          if (this.manufacturer[i].id == manufacturer_id) {
263
+            return this.manufacturer[i].manufacturer_name
264
+          }
265
+        }
266
+      }, getDealerName: function(dealer_id) {
267
+        for (let i = 0; i < this.dealer.length; i++) {
268
+          if (this.dealer[i].id == dealer_id) {
269
+            return this.dealer[i].dealer_name
270
+          }
271
+        }
272
+      }, handleEdit: function(index, row) {
273
+        this.$router.push({ name: 'stockOutDetail', query: { id: row.id }})
274
+      }, handleDelete: function(index, row) {
275
+        const ids = []
276
+        ids.push(row.id)
277
+        const idStr = ids.join(',')
278
+
279
+        const params = {
280
+          ids: idStr
281
+        }
282
+
283
+        this.$confirm('确认删除退货单记录?', '删除退货单记录', {
284
+          confirmButtonText: '确定',
285
+          cancelButtonText: '取消',
286
+          type: 'warning'
287
+        }).then(() => {
288
+          deleteWarehouseOut(params).then(response => {
289
+            if (response.data.state == 0) {
290
+              this.$message.error(response.data.msg)
291
+              return false
292
+            } else {
293
+              this.$notify({
294
+                title: '成功',
295
+                message: '删除成功',
296
+                type: 'success',
297
+                duration: 2000
298
+              })
299
+              for (let i = 0; i < ids.length; i++) {
300
+                for (let y = 0; y < this.warehouseOutDate.length; y++) {
301
+                  if (ids[i] == this.warehouseOutDate[y].id) {
302
+                    this.warehouseOutDate.splice(y, 1)
303
+                  }
304
+                }
305
+              }
306
+            }
307
+          })
308
+        }).catch(() => {
309
+        })
310
+      }, changeAllSelected: function(val) {
311
+        if (val) {
312
+          this.$refs.multipleTable.toggleAllSelection()
313
+        } else {
314
+          this.$refs.multipleTable.clearSelection()
315
+        }
316
+      }, select(selection) {
317
+        this.selectedTableData = selection
318
+      }, batchDelete() {
319
+        if (this.selectedTableData.length <= 0) {
320
+          this.$message.error('请选择要删除的记录')
321
+          return
322
+        }
323
+        const ids = []
324
+        for (let i = 0; i < this.selectedTableData.length; i++) {
325
+          ids.push(this.selectedTableData[i].id)
326
+        }
327
+        const idStr = ids.join(',')
328
+        const params = {
329
+          ids: idStr
330
+        }
331
+        this.$confirm('确认删除退货单记录?', '删除退货单记录', {
332
+          confirmButtonText: '确定',
333
+          cancelButtonText: '取消',
334
+          type: 'warning'
335
+        }).then(() => {
336
+          deleteWarehouseOut(params).then(response => {
337
+            if (response.data.state == 0) {
338
+              this.$message.error(response.data.msg)
339
+              return false
340
+            } else {
341
+              this.$notify({
342
+                title: '成功',
343
+                message: '删除成功',
344
+                type: 'success',
345
+                duration: 2000
346
+              })
347
+
348
+              for (let i = 0; i < ids.length; i++) {
349
+                for (let y = 0; y < this.warehouseOutDate.length; y++) {
350
+                  if (ids[i] == this.warehouseOutDate[y].id) {
351
+                    this.warehouseOutDate.splice(y, 1)
352
+                  }
353
+                }
354
+              }
355
+            }
356
+          })
357
+        }).catch(() => {
358
+        })
359
+      }
360
+    }
8 361
   }
9 362
 </script>
10 363
 
11
-<style scoped>
364
+<style rel="stylesheet/css" lang="scss" scoped>
365
+  .information {
366
+    border: 1px #dcdfe6 solid;
367
+    padding: 30px 20px 30px 20px;
368
+
369
+  .border {
370
+    border-bottom: 1px #dcdfe6 solid;
371
+    margin: 0px 0 20px 0;
372
+  }
373
+
374
+  }
375
+
376
+  .title {
377
+    background: #409eff;
378
+    height: 44px;
379
+    line-height: 44px;
380
+    padding: 0 0 0 10px;
381
+    color: #fff;
382
+    margin: 0 0 10px 0;
383
+
384
+  }
385
+
386
+  .edit_separater {
387
+    border-top: 1px solid rgb(233, 233, 233);
388
+    margin-top: 15px;
389
+    margin-bottom: 15px;
390
+  }
391
+
392
+</style>
393
+
394
+<style>
395
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
396
+    font-size: 12px;
397
+  }
398
+
399
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
400
+    background: #6fb5fa;
401
+  }
402
+
403
+  .count {
404
+    color: #bd2c00;
405
+
406
+  }
12 407
 
13 408
 </style>

+ 432 - 2
src/xt_pages/stock/otherStockOutOrderAdd.vue 查看文件

@@ -1,13 +1,443 @@
1 1
 <template>
2 2
 
3
+  <div class="app-container sign-and-weigh-box">
4
+
5
+    <sales-return-dialog :propForm="propForm"
6
+                         :visibility="isVisibility"
7
+                         v-on:dialog-comfirm="comfirm"
8
+                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
+
10
+    <div class="filter-container">
11
+
12
+      <el-row>
13
+        <el-col :span="8"><div>
14
+          <span>退货时间:</span>
15
+          <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
+                          value-format="yyyy-MM-dd"></el-date-picker>
18
+        </div></el-col>
19
+
20
+
21
+        <el-col :span="8">
22
+          <div>
23
+            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24
+              <el-form-item label="厂商:" prop="manufacturer">
25
+                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
+                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
27
+                </el-select>
28
+              </el-form-item>
29
+            </el-form>
30
+          </div>
31
+        </el-col>
32
+        <el-col :span="8">
33
+          <div>
34
+            <el-form ref="form" :model="form" label-width="80px">
35
+              <el-form-item label="经销商:">
36
+                <el-select v-model="form.dealer" placeholder="请选择经销商">
37
+                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
38
+                </el-select>
39
+              </el-form-item>
40
+            </el-form>
41
+          </div>
42
+        </el-col>
43
+      </el-row>
44
+
45
+    </div>
46
+
47
+    <el-row>
48
+      <el-col>
49
+        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
50
+          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51
+                    max-height="450"
52
+          >
53
+
54
+            <el-table-column label="操作" align="center" min-width="30">
55
+              <template slot-scope="scope">
56
+                <el-button
57
+                  size="mini"
58
+                  @click="handleEdit(scope.$index, scope.row)">+
59
+                </el-button>
60
+                <el-button
61
+                  size="mini"
62
+                  type="danger"
63
+                  @click="handleDelete(scope.$index, scope.row)">-
64
+                </el-button>
65
+              </template>
66
+            </el-table-column>
67
+
68
+            <el-table-column min-width="35" align="center">
69
+
70
+              <template slot="header" slot-scope="scope">
71
+                <span>物品类型<span style="color: red">*</span></span>
72
+              </template>
73
+
74
+              <template slot-scope="scope" >
75
+                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76
+                <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77
+
78
+                <el-form-item  style="padding-top: 15px">
79
+                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
80
+                </el-form-item>
81
+
82
+              </template>
83
+            </el-table-column>
84
+            <el-table-column min-width="35" align="center">
85
+              <template slot="header" slot-scope="scope">
86
+                <span>规格名称<span style="color: red">*</span></span>
87
+              </template>
88
+              <template slot-scope="scope">
89
+
90
+                <el-form-item  style="padding-top: 15px">
91
+                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
92
+                </el-form-item>
93
+
94
+              </template>
95
+            </el-table-column>
96
+
97
+
98
+            <el-table-column  min-width="23" align="center">
99
+              <template slot="header" slot-scope="scope">
100
+                <span>单价<span style="color: red">*</span></span>
101
+              </template>
102
+              <template slot-scope="scope">
103
+                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
104
+                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
105
+                  <el-input type="number"  v-model="scope.row.price" ></el-input>
106
+                </el-form-item>
107
+
108
+
109
+              </template>
110
+            </el-table-column>
111
+
112
+            <el-table-column  min-width="23" align="center">
113
+              <template slot="header" slot-scope="scope">
114
+                <span>出库数量<span style="color: red">*</span></span>
115
+              </template>
116
+              <template slot-scope="scope">
117
+                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
118
+                  <el-input type="number"  v-model="scope.row.count" ></el-input>
119
+                </el-form-item>
120
+              </template>
121
+            </el-table-column>
122
+
123
+            <el-table-column label="总价" min-width="20" align="center">
124
+              <template slot-scope="scope">
125
+                {{calculate(scope.row.price*scope.row.count)}}
126
+              </template>
127
+            </el-table-column>
128
+            <el-table-column label="备注" min-width="20" align="center">
129
+              <template slot-scope="scope">
130
+                <el-input  v-model="scope.row.remark"></el-input>
131
+              </template>
132
+            </el-table-column>
133
+          </el-table>
134
+        </el-form>
135
+      </el-col>
136
+
137
+
138
+      <span  class="dialog-footer" style="margin-top: 20px;float:right">
139
+        <el-button @click="back()">取 消</el-button>
140
+        <el-button type="primary" @click="submit()">确 定</el-button>
141
+      </span>
142
+
143
+    </el-row>
144
+  </div>
3 145
 </template>
4 146
 
5 147
 <script>
148
+  import { uParseTime } from '@/utils/tools'
149
+  import {
150
+    getSalesReturnConfig,
151
+    postWarehouseOut,
152
+  } from '@/api/stock'
153
+  import SalesReturnDialog from './Dialog/salesReturnDialog'
154
+
6 155
   export default {
7
-    name: 'otherStockOutOrderAdd'
156
+    components: { SalesReturnDialog},
157
+    name: 'otherStockOutOrderAdd',
158
+
159
+    data() {
160
+      return {
161
+        type:2,
162
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
163
+        warehouse_out_time: '',
164
+        currentIndex: 0,
165
+        recordInfo: {
166
+          recordData: [],
167
+        },
168
+        tableRules: {
169
+          price: [
170
+            { required: true, message: '单价不能为空', trigger: 'blur' }
171
+          ],
172
+          count: [
173
+            { required: true, message: '数量不能为空', trigge: 'blur' }
174
+          ],
175
+        },
176
+        ruleForm: {
177
+          manufacturer: [
178
+            { required: true, message: '请选择厂商', trigger: 'change' }
179
+          ]
180
+
181
+        },
182
+        // prop
183
+        isVisibility: false,
184
+        propForm: {
185
+          goodType: [],
186
+          goodInfo: [],
187
+          goodUnit: [],
188
+        },
189
+        form: {
190
+          manufacturer: '',
191
+          dealer: ''
192
+        },
193
+
194
+        manufacturer: [],
195
+        dealer: [],
196
+        goodType: []
197
+      }
198
+    },
199
+    methods: {
200
+      comfirm: function(val) {
201
+        this.isVisibility = false
202
+        if (val.selectedGoodInfo.length > 0) {
203
+          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
204
+            if (i == 0) {
205
+              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
206
+              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
207
+            } else {
208
+              const tempForm = {}
209
+              tempForm['good_type_id'] = val.goodTypeId
210
+              tempForm['good_id'] = val.selectedGoodInfo[i].id
211
+              tempForm['count'] = ''
212
+              tempForm['price'] = ''
213
+              tempForm['remark'] = ''
214
+
215
+              this.recordInfo.recordData.push(tempForm)
216
+            }
217
+          }
218
+        }
219
+
220
+        this.currentIndex = -1
221
+      }, cancle: function() {
222
+        this.isVisibility = false
223
+      }, GetConfigInfo: function() {
224
+        getSalesReturnConfig().then(response => {
225
+          if (response.data.state == 0) {
226
+            this.$message.error(response.data.msg)
227
+            return false
228
+          } else {
229
+            var warehouseList =  response.data.data.warehouseList
230
+            var warehouseInfoList =  response.data.data.warehouseInfoList
231
+            for (let i = 0; i <warehouseList.length; i++ ){
232
+              if(warehouseList[i].Manufacturer.id > 0){
233
+                this.manufacturer.push(warehouseList[i].Manufacturer)
234
+              }
235
+              if(warehouseList[i].Dealer.id > 0){
236
+                this.dealer.push(warehouseList[i].Dealer)
237
+              }
238
+            }
239
+            for (let i = 0; i < warehouseInfoList.length; i++) {
240
+              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
241
+
242
+            }
243
+            const obj = {}
244
+            const obj2 = {}
245
+            const obj4 = {}
246
+            //去重复
247
+            this.manufacturer =  this.manufacturer.reduce((cur, next) => {
248
+              obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
249
+              return cur
250
+            }, [])
251
+            //去重复
252
+            this.dealer =  this.dealer.reduce((cur, next) => {
253
+              obj2[next.id] ? '' : obj2[next.id] = true && cur.push(next)
254
+              return cur
255
+            }, [])
256
+            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
257
+              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
258
+              return cur
259
+            }, [])
260
+
261
+
262
+          }
263
+        })
264
+      }, typeName: function(good_type_id) {
265
+        let name = ''
266
+        for (let i = 0; i < this.propForm.goodType.length; i++) {
267
+          if (this.propForm.goodType[i].id == good_type_id) {
268
+            name = this.propForm.goodType[i].type_name
269
+          }
270
+        }
271
+        return name
272
+      }, specificationName: function(good_info_id) {
273
+        let name = ''
274
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
275
+          if (this.propForm.goodInfo[i].id == good_info_id) {
276
+            name = this.propForm.goodInfo[i].specification_name
277
+          }
278
+        }
279
+        return name
280
+      }, handleEdit: function(index, row) {
281
+        const tempObj = {}
282
+        tempObj['good_type_id'] = 0
283
+        tempObj['good_id'] = 0
284
+        tempObj['count'] = ''
285
+        tempObj['price'] = ''
286
+        tempObj['remark'] = ''
287
+
288
+
289
+        this.recordInfo.recordData.push(tempObj)
290
+      }, handleDelete: function(index, row) {
291
+        this.recordInfo.recordData.splice(index, 1)
292
+      }, calculate: function(val) {
293
+        if(isNaN(val)){
294
+          return ''
295
+        }
296
+        if (val == 0) {
297
+          return ''
298
+        }
299
+        return Math.round(parseFloat(val) * 100) / 100
300
+      }, getTime(val, temp) {
301
+        if (val != 0) {
302
+          return uParseTime(val, temp)
303
+        } else {
304
+          return ''
305
+        }
306
+      }, showDialog(index, row) {
307
+        this.currentIndex = index
308
+        if (this.form.manufacturer == '' || this.form.manufacturer == 0) {
309
+          this.$message.error('请先选择厂商')
310
+          return
311
+        } else {
312
+          this.isVisibility = true
313
+          console.log(this.form.manufacturer)
314
+          for (let i = 0; i < this.propForm.goodInfo.length; i++){
315
+            if(this.propForm.goodInfo[i].manufacturer == this.form.manufacturer){
316
+              this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
317
+            }
318
+
319
+          }
320
+          const obj3 = {}
321
+          this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
322
+            obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
323
+            return cur
324
+          }, [])
325
+
326
+
327
+
328
+        }
329
+      }, back() {
330
+        this.$router.go(-1)
331
+      }, submit() {
332
+        this.$refs['tableForm'].validate((valid) => {
333
+          if (valid) {
334
+            if (this.form.manufacturer == 0) {
335
+              this.$message.error('厂商不能为空')
336
+              return
337
+            }
338
+            const array = this.recordInfo.recordData
339
+            let total = 0
340
+            for (let i = 0; i < array.length; i++) {
341
+              if (array[i].good_type_id == 0) {
342
+                this.$message.error('物品类型不能为空')
343
+                return
344
+              }
345
+              if (array[i].good_id == 0) {
346
+                this.$message.error('规格名称不能为空')
347
+                return
348
+              }
349
+              total = total + array[i].price * array[i].return_count
350
+            }
351
+            const params = {
352
+              'stockOut': this.recordInfo.recordData
353
+            }
354
+            console.log(this.form.dealer)
355
+
356
+
357
+            postWarehouseOut(params,this.warehouse_out_time,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
358
+              if (response.data.state==0) {
359
+                this.$message.error(response.data.msg);
360
+                return false;
361
+              }else {
362
+                this.$notify({
363
+                  title: "成功",
364
+                  message: "退货成功",
365
+                  type: "success",
366
+                  duration: 2000
367
+                });
368
+                this.recordInfo.recordData = []
369
+                this.$router.back(-1)
370
+              }
371
+            });
372
+          } else {
373
+            return false
374
+          }
375
+        })
376
+      }
377
+    },
378
+    created() {
379
+      var year = new Date().getFullYear()
380
+      var month = new Date().getMonth() + 1
381
+      var day = new Date().getDate()
382
+      if (parseInt(month) < 10) {
383
+        month = '0' + month
384
+      }
385
+      if (parseInt(day) < 10) {
386
+        day = '0' + day
387
+      }
388
+      const endTime = year + '-' + month + '-' + day
389
+      this.warehouse_out_time = endTime
390
+      const tempObj = {}
391
+      tempObj['good_type_id'] = 0
392
+      tempObj['good_id'] = 0
393
+      tempObj['return_count'] = 0
394
+      tempObj['price'] = ''
395
+      tempObj['remark'] = ''
396
+
397
+      this.recordInfo.recordData.push(tempObj)
398
+      this.GetConfigInfo()
399
+      this.propForm.goodUnit = this.$store.getters.good_unit
400
+    }
401
+
8 402
   }
9 403
 </script>
10 404
 
11
-<style scoped>
405
+<style rel="stylesheet/css" lang="scss" scoped>
406
+  .information {
407
+    border: 1px #dcdfe6 solid;
408
+    padding: 30px 20px 30px 20px;
409
+
410
+  .border {
411
+    border-bottom: 1px #dcdfe6 solid;
412
+    margin: 0px 0 20px 0;
413
+  }
414
+  }
415
+
416
+  .title {
417
+    background: #409eff;
418
+    height: 44px;
419
+    line-height: 44px;
420
+    padding: 0 0 0 10px;
421
+    color: #fff;
422
+    margin: 0 0 10px 0;
423
+  // border-radius: 4px 4px 0 0;
424
+  }
425
+
426
+  .edit_separater {
427
+    border-top: 1px solid rgb(233, 233, 233);
428
+    margin-top: 15px;
429
+    margin-bottom: 15px;
430
+  }
431
+
432
+</style>
433
+
434
+<style>
435
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
436
+    font-size: 12px;
437
+  }
438
+
439
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
440
+    background: #6fb5fa;
441
+  }
12 442
 
13 443
 </style>

+ 247 - 2
src/xt_pages/stock/otherStockOutOrderDetail.vue 查看文件

@@ -1,13 +1,258 @@
1 1
 <template>
2 2
 
3
+  <div class="app-container sign-and-weigh-box">
4
+
5
+    <div class="filter-container">
6
+      <span style="font-size: 20px">退货单详情</span>
7
+      <el-row style="float:right;">
8
+        <span>{{warehousingOutInfo.info.warehouse_out_order_number}}</span>
9
+      </el-row>
10
+    </div>
11
+
12
+
13
+
14
+    <div class="filter-container">
15
+      <span>单据日期:  {{warehousingOutInfo.info.warehouse_out_time | parseTime('{y}-{m}-{d}')}} </span>
16
+      <span>厂商 {{getManufactuerName(warehousingOutInfo.info.manufacturer)}}</span>
17
+      <span>经销商 {{getDealerName(warehousingOutInfo.info.dealer)}}</span>
18
+    </div>
19
+
20
+    <div class="filter-container" style="margin-top: 10px">
21
+      <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
22
+      <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
23
+    </div>
24
+
25
+    <el-row :gutter="12" style="margin-top: 10px">
26
+      <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
+      >
28
+        <el-table-column min-width="35" align="center">
29
+          <template slot="header" slot-scope="scope">
30
+            <span>物品类型</span>
31
+          </template>
32
+
33
+          <template slot-scope="scope">
34
+            <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
35
+          </template>
36
+        </el-table-column>
37
+        <el-table-column min-width="35" align="center">
38
+          <template slot="header" slot-scope="scope">
39
+            <span>规格名称</span>
40
+          </template>
41
+          <template slot-scope="scope">
42
+            <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
43
+          </template>
44
+        </el-table-column>
45
+
46
+
47
+        <el-table-column min-width="23" align="center">
48
+          <template slot="header" slot-scope="scope">
49
+            <span>单价</span>
50
+          </template>
51
+          <template slot-scope="scope">
52
+            <span>{{scope.row.price}}</span>
53
+          </template>
54
+        </el-table-column>
55
+
56
+        <el-table-column min-width="23" align="center">
57
+          <template slot="header" slot-scope="scope">
58
+            <span>出库数量</span>
59
+          </template>
60
+          <template slot-scope="scope">
61
+            <span>{{scope.row.count}}</span>
62
+
63
+          </template>
64
+        </el-table-column>
65
+        <el-table-column label="总价" min-width="20" align="center">
66
+          <template slot-scope="scope">
67
+            {{calculate(scope.row.price*scope.row.count)}}
68
+          </template>
69
+        </el-table-column>
70
+
71
+        <el-table-column label="备注" min-width="20"  align="center">
72
+          <template slot-scope="scope">
73
+            <el-popover placement="top-start"  width="250" trigger="hover" >
74
+              <div>{{scope.row.remark}}</div>
75
+              <span slot="reference" v-if="scope.row.remark.length > 20">{{ scope.row.remark.substr(0,20)+'...' }}</span>
76
+              <span slot="reference" v-else>{{ scope.row.remark}}</span>
77
+            </el-popover>
78
+
79
+          </template>
80
+        </el-table-column>
81
+
82
+
83
+      </el-table>
84
+    </el-row>
85
+  </div>
3 86
 </template>
4 87
 
5 88
 <script>
89
+  import { uParseTime } from '@/utils/tools'
90
+  import { GetAllConfig,getWarehouseOutInfo,deleteWarehouseOut } from '@/api/stock'
91
+
6 92
   export default {
7
-    name: 'otherStockOutOrderDetail'
93
+    name: 'otherStockOutOrderDetail',
94
+    created() {
95
+      const order_id = this.$route.query.id
96
+      this.GetConfigInfo()
97
+      this.GetOrderDetail(order_id)
98
+    },
99
+    data() {
100
+      return {
101
+        isEdit: 0,
102
+        checked: false,
103
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
104
+        goodType: [],
105
+        goodInfo: [],
106
+        manufacturer: [],
107
+        dealer: [],
108
+
109
+        warehousingOutInfo: {
110
+          loading: false,
111
+          warehousingOutData: [],
112
+          info: {}
113
+        }
114
+      }
115
+    },
116
+    methods: {
117
+      getSpecificationName: function(id) {
118
+        let name = ''
119
+        for (let i = 0; i < this.goodInfo.length; i++) {
120
+          if (this.goodInfo[i].id == id) {
121
+            name = this.goodInfo[i].specification_name
122
+          }
123
+        }
124
+        return name
125
+      }, getTypeName: function(id) {
126
+        let name = ''
127
+        for (let i = 0; i < this.goodType.length; i++) {
128
+          if (this.goodType[i].id == id) {
129
+            name = this.goodType[i].type_name
130
+          }
131
+        }
132
+        return name
133
+      }, GetConfigInfo: function() {
134
+        GetAllConfig().then(response => {
135
+          if (response.data.state == 0) {
136
+            this.$message.error(response.data.msg)
137
+            return false
138
+          } else {
139
+            this.manufacturer = response.data.data.manufacturer
140
+            this.dealer = response.data.data.dealer
141
+            this.goodInfo = response.data.data.goodInfo
142
+            this.goodType = response.data.data.goodType
143
+          }
144
+        })
145
+      }, getManufactuerName: function(manufacturer_id) {
146
+        for (let i = 0; i < this.manufacturer.length; i++) {
147
+          if (this.manufacturer[i].id == manufacturer_id) {
148
+            return this.manufacturer[i].manufacturer_name
149
+          }
150
+        }
151
+      }, getDealerName: function(dealer_id) {
152
+        for (let i = 0; i < this.dealer.length; i++) {
153
+          if (this.dealer[i].id == dealer_id) {
154
+            return this.dealer[i].dealer_name
155
+          }
156
+        }
157
+      }, calculate: function(val) {
158
+        if (val == 0) {
159
+          return ''
160
+        }
161
+        return Math.round(parseFloat(val) * 100) / 100
162
+      }, GetOrderDetail: function(order_id) {
163
+        const params = {
164
+          'id': order_id
165
+        }
166
+        getWarehouseOutInfo(params).then(response => {
167
+          if (response.data.state == 0) {
168
+            this.$message.error(response.data.msg)
169
+            return false
170
+          } else {
171
+            for (let i = 0; i < response.data.data.list.length; i++) {
172
+              this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
173
+            }
174
+            this.warehousingOutInfo.info = response.data.data.info
175
+          }
176
+        })
177
+      }, deleteRecord: function() {
178
+        const ids = []
179
+        ids.push(this.warehousingOutInfo.info.id)
180
+        const idStr = ids.join(',')
181
+
182
+        const params = {
183
+          ids: idStr
184
+        }
185
+
186
+        this.$confirm('确认删除退货单?', '删除退货单记录', {
187
+          confirmButtonText: '确定',
188
+          cancelButtonText: '取消',
189
+          type: 'warning'
190
+        }).then(() => {
191
+          deleteWarehouseOut(params).then(response => {
192
+            if (response.data.state == 0) {
193
+              this.$message.error(response.data.msg)
194
+              return false
195
+            } else {
196
+              this.$notify({
197
+                title: '成功',
198
+                message: '删除成功',
199
+                type: 'success',
200
+                duration: 2000
201
+              })
202
+
203
+              this.$router.back(-1)
204
+            }
205
+          })
206
+        }).catch(() => {
207
+        })
208
+      }, editRecord: function() {
209
+        this.$emit('edit-record')
210
+      }
211
+    }
8 212
   }
9 213
 </script>
10 214
 
11
-<style scoped>
215
+<style rel="stylesheet/css" lang="scss" scoped>
216
+  .information {
217
+    border: 1px #dcdfe6 solid;
218
+    padding: 30px 20px 30px 20px;
219
+
220
+  .border {
221
+    border-bottom: 1px #dcdfe6 solid;
222
+    margin: 0px 0 20px 0;
223
+  }
224
+
225
+  }
226
+
227
+  .title {
228
+    background: #409eff;
229
+    height: 44px;
230
+    line-height: 44px;
231
+    padding: 0 0 0 10px;
232
+    color: #fff;
233
+    margin: 0 0 10px 0;
234
+  }
235
+
236
+  .edit_separater {
237
+    border-top: 1px solid rgb(233, 233, 233);
238
+    margin-top: 15px;
239
+    margin-bottom: 15px;
240
+  }
241
+
242
+</style>
243
+
244
+<style>
245
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
246
+    font-size: 12px;
247
+  }
248
+
249
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
250
+    background: #6fb5fa;
251
+  }
252
+
253
+  .count {
254
+    color: #bd2c00;
255
+
256
+  }
12 257
 
13 258
 </style>

+ 414 - 2
src/xt_pages/stock/otherStockOutOrderEdit.vue 查看文件

@@ -1,13 +1,425 @@
1 1
 <template>
2 2
 
3
+  <div class="app-container sign-and-weigh-box">
4
+
5
+    <sales-return-dialog :propForm="propForm"
6
+                         :visibility="isVisibility"
7
+                         v-on:dialog-comfirm="comfirm"
8
+                         v-on:dialog-cancle="cancle"></sales-return-dialog>
9
+
10
+    <div class="filter-container">
11
+
12
+      <el-row>
13
+        <el-col :span="8">
14
+          <div>
15
+            <span>入库时间:</span>
16
+            <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
+                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
+                            value-format="yyyy-MM-dd"></el-date-picker>
19
+          </div>
20
+        </el-col>
21
+      </el-row>
22
+    </div>
23
+
24
+    <el-row>
25
+      <el-col>
26
+        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
27
+          <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
+                    max-height="450"
29
+          >
30
+
31
+            <el-table-column label="操作" align="center" min-width="30">
32
+              <template slot-scope="scope">
33
+                <el-button
34
+                  size="mini"
35
+                  @click="handleEdit(scope.$index, scope.row)">+
36
+                </el-button>
37
+                <el-button
38
+                  size="mini"
39
+                  type="danger"
40
+                  @click="handleDelete(scope.$index, scope.row)">-
41
+                </el-button>
42
+              </template>
43
+            </el-table-column>
44
+
45
+            <el-table-column min-width="35" align="center">
46
+
47
+              <template slot="header" slot-scope="scope">
48
+                <span>物品类型<span style="color: red">*</span></span>
49
+              </template>
50
+
51
+              <template slot-scope="scope">
52
+                <el-form-item style="padding-top: 15px">
53
+                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
54
+                            :value="typeName(scope.row.good_type_id)"
55
+                            @focus="showDialog(scope.$index, scope.row)"></el-input>
56
+                </el-form-item>
57
+              </template>
58
+            </el-table-column>
59
+            <el-table-column min-width="35" align="center">
60
+              <template slot="header" slot-scope="scope">
61
+                <span>规格名称<span style="color: red">*</span></span>
62
+              </template>
63
+              <template slot-scope="scope">
64
+
65
+                <el-form-item style="padding-top: 15px">
66
+                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
67
+                            :value="specificationName(scope.row.good_id)"
68
+                            @focus="showDialog(scope.$index, scope.row)"></el-input>
69
+                </el-form-item>
70
+
71
+              </template>
72
+            </el-table-column>
73
+
74
+
75
+            <el-table-column  min-width="23" align="center">
76
+              <template slot="header" slot-scope="scope">
77
+                <span>单价<span style="color: red">*</span></span>
78
+              </template>
79
+              <template slot-scope="scope">
80
+                <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
81
+                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
82
+                  <el-input type="number"  v-model="scope.row.price" ></el-input>
83
+                </el-form-item>
84
+
85
+
86
+              </template>
87
+            </el-table-column>
88
+
89
+            <el-table-column  min-width="23" align="center">
90
+              <template slot="header" slot-scope="scope">
91
+                <span>出库数量<span style="color: red">*</span></span>
92
+              </template>
93
+              <template slot-scope="scope">
94
+                <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
95
+                  <el-input type="number"  v-model="scope.row.count" ></el-input>
96
+                </el-form-item>
97
+              </template>
98
+            </el-table-column>
99
+
100
+            <el-table-column label="总价" min-width="20" align="center">
101
+              <template slot-scope="scope">
102
+                {{calculate(scope.row.price*scope.row.count)}}
103
+              </template>
104
+            </el-table-column>
105
+            <el-table-column label="备注" min-width="20" align="center">
106
+              <template slot-scope="scope">
107
+                <el-input  v-model="scope.row.remark"></el-input>
108
+              </template>
109
+            </el-table-column>
110
+          </el-table>
111
+        </el-form>
112
+      </el-col>
113
+
114
+
115
+      <span class="dialog-footer" style="margin-top: 20px;float:right">
116
+        <el-button @click="back()">取 消</el-button>
117
+        <el-button type="primary" @click="submit()">确 定</el-button>
118
+      </span>
119
+
120
+    </el-row>
121
+  </div>
3 122
 </template>
4 123
 
5 124
 <script>
125
+  import { uParseTime } from '@/utils/tools'
126
+
127
+  import {
128
+    deleteWarehouseOutInfo,
129
+    getWarehouseOutInfo,
130
+    getSalesReturnConfig,
131
+    editWarehouseoutInfo
132
+  } from '@/api/stock'
133
+  import SalesReturnDialog from './Dialog/salesReturnDialog'
134
+
6 135
   export default {
7
-    name: 'otherStockOutOrderEdit'
136
+    components: { SalesReturnDialog},
137
+    name: 'otherStockOutOrderEdit',
138
+
139
+    data() {
140
+      return {
141
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142
+
143
+        adminUserOptions: null,
144
+        currentIndex: 0,
145
+        warehouse_out_time: '',
146
+        recordInfo: {
147
+          recordData: [],
148
+          stock_in_code: '',
149
+          current_index: ''
150
+
151
+        },
152
+        tableRules: {
153
+          count: [
154
+            { required: true, message: '数量不能为空', trigge: 'blur' }
155
+          ],
156
+          price: [
157
+            { required: true, message: '单价不能为空', trigger: 'blur' }
158
+          ],
159
+
160
+        },
161
+        ruleForm: {
162
+          manufacturer: [
163
+            { required: true, message: '请选择厂商', trigger: 'change' }
164
+          ]
165
+        },
166
+        // prop
167
+        isVisibility: false,
168
+        propForm: {
169
+          goodType: [],
170
+          goodInfo: [],
171
+          goodUnit: [],
172
+          title: '入库'
173
+        },
174
+
175
+        form: {
176
+          manufacturer: '',
177
+          dealer: ''
178
+        },
179
+
180
+        warehouseOut: {},
181
+        manufacturer: [],
182
+        dealer: [],
183
+        goodType: []
184
+      }
185
+    },
186
+    methods: {
187
+      comfirm: function(val) {
188
+        this.isVisibility = false
189
+        if (val.selectedGoodInfo.length > 0) {
190
+          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
191
+            if (i == 0) {
192
+              this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
193
+              this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
194
+            } else {
195
+              const tempForm = {}
196
+              tempForm['id'] = 0
197
+              tempForm['good_type_id'] = val.goodTypeId
198
+              tempForm['good_id'] = val.selectedGoodInfo[i].id
199
+              tempForm['count'] = ''
200
+              tempForm['price'] = ''
201
+              tempForm['remark'] = ''
202
+
203
+              this.recordInfo.recordData.push(tempForm)
204
+            }
205
+          }
206
+        }
207
+
208
+        this.currentIndex = -1
209
+      }, cancle: function() {
210
+        this.isVisibility = false
211
+      }, GetConfigInfo: function() {
212
+        getSalesReturnConfig().then(response => {
213
+          if (response.data.state == 0) {
214
+            this.$message.error(response.data.msg)
215
+            return false
216
+          } else {
217
+            var warehouseInfoList = response.data.data.warehouseInfoList
218
+            for (let i = 0; i < warehouseInfoList.length; i++) {
219
+              this.propForm.goodInfo.push(warehouseInfoList[i].GoodInfo)
220
+              this.propForm.goodType.push(warehouseInfoList[i].GoodInfo.GoodsType)
221
+
222
+            }
223
+            const obj3 = {}
224
+            const obj4 = {}
225
+            this.propForm.goodInfo = this.propForm.goodInfo.reduce((cur, next) => {
226
+              obj4[next.id] ? '' : obj4[next.id] = true && cur.push(next)
227
+              return cur
228
+            }, [])
229
+            this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
230
+              obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
231
+              return cur
232
+            }, [])
233
+          }
234
+        })
235
+      }, typeName: function(good_type_id) {
236
+        let name = ''
237
+        for (let i = 0; i < this.propForm.goodType.length; i++) {
238
+          if (this.propForm.goodType[i].id == good_type_id) {
239
+            name = this.propForm.goodType[i].type_name
240
+          }
241
+        }
242
+        return name
243
+      }, specificationName: function(good_info_id) {
244
+        let name = ''
245
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
246
+          if (this.propForm.goodInfo[i].id == good_info_id) {
247
+            name = this.propForm.goodInfo[i].specification_name
248
+          }
249
+        }
250
+        return name
251
+      }, handleEdit: function(index, row) {
252
+        const tempObj = {}
253
+        tempObj['id'] = 0
254
+        tempObj['good_type_id'] = 0
255
+        tempObj['good_id'] = 0
256
+        tempObj['count'] = ''
257
+        tempObj['price'] = ''
258
+        tempObj['remark'] = ''
259
+        this.recordInfo.recordData.push(tempObj)
260
+      }, handleDelete: function(index, row) {
261
+        if (row.id == 0) {
262
+          this.recordInfo.recordData.splice(index, 1)
263
+        } else {
264
+          const params = {
265
+            id: row.id
266
+          }
267
+          this.$confirm('确认删除该退货物品信息记录?', '删除退货物品信息记录', {
268
+            confirmButtonText: '确定',
269
+            cancelButtonText: '取消',
270
+            type: 'warning'
271
+          }).then(() => {
272
+            deleteWarehouseOutInfo(params).then(response => {
273
+              if (response.data.state == 0) {
274
+                this.$message.error(response.data.msg)
275
+                return false
276
+              } else {
277
+                this.$notify({
278
+                  title: '成功',
279
+                  message: '删除成功',
280
+                  type: 'success',
281
+                  duration: 2000
282
+                })
283
+                this.recordInfo.recordData.splice(index, 1)
284
+              }
285
+            })
286
+          }).catch(() => {
287
+          })
288
+        }
289
+      }, getTime(val, temp) {
290
+        if (val != 0) {
291
+          return uParseTime(val, temp)
292
+        } else {
293
+          return ''
294
+        }
295
+      }, showDialog(index, row) {
296
+        this.currentIndex = index
297
+
298
+        this.isVisibility = true
299
+        console.log(this.form.manufacturer)
300
+        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
301
+          if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
302
+            this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
303
+          }
304
+        }
305
+        const obj3 = {}
306
+        this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
307
+          obj3[next.id] ? '' : obj3[next.id] = true && cur.push(next)
308
+          return cur
309
+        }, [])
310
+
311
+      }, back() {
312
+        this.$router.go(-1)
313
+      }, submit() {
314
+        this.$refs['tableForm'].validate((valid) => {
315
+          if (valid) {
316
+            const array = this.recordInfo.recordData
317
+            for (let i = 0; i < array.length; i++) {
318
+              if (array[i].good_type_id == 0) {
319
+                this.$message.error('物品类型不能为空')
320
+                return
321
+              }
322
+              if (array[i].good_id == 0) {
323
+                this.$message.error('规格名称不能为空')
324
+                return
325
+              }
326
+            }
327
+
328
+            const params = {
329
+              'stockOut': this.recordInfo.recordData
330
+            }
331
+            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id).then(response => {
332
+              if (response.data.state == 0) {
333
+                this.$message.error(response.data.msg)
334
+                return false
335
+              } else {
336
+                this.$notify({
337
+                  title: '成功',
338
+                  message: '退货成功',
339
+                  type: 'success',
340
+                  duration: 2000
341
+                })
342
+                this.$router.back(-1)
343
+              }
344
+            })
345
+          } else {
346
+            return false
347
+          }
348
+        })
349
+      }, GetOrderDetail: function(order_id) {
350
+        const params = {
351
+          'id': order_id
352
+        }
353
+        getWarehouseOutInfo(params).then(response => {
354
+          if (response.data.state == 0) {
355
+            this.$message.error(response.data.msg)
356
+            return false
357
+          } else {
358
+            for (let i = 0; i < response.data.data.list.length; i++) {
359
+              response.data.data.list[i].price = response.data.data.list[i].price.toString()
360
+              response.data.data.list[i].count = response.data.data.list[i].count.toString()
361
+              this.recordInfo.recordData.push(response.data.data.list[i])
362
+            }
363
+            this.warehouseOut = response.data.data.info
364
+            this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
365
+
366
+          }
367
+
368
+        })
369
+      }, calculate: function(val) {
370
+        if (val == 0) {
371
+          return ''
372
+        }
373
+        return Math.round(parseFloat(val) * 100) / 100
374
+      }
375
+    },
376
+    created() {
377
+      this.GetConfigInfo()
378
+      this.propForm.goodUnit = this.$store.getters.good_unit
379
+      const order_id = this.$route.query.id
380
+      this.GetOrderDetail(order_id)
381
+    }
382
+
8 383
   }
9 384
 </script>
10 385
 
11
-<style scoped>
386
+<style rel="stylesheet/css" lang="scss" scoped>
387
+  .information {
388
+    border: 1px #dcdfe6 solid;
389
+    padding: 30px 20px 30px 20px;
390
+
391
+  .border {
392
+    border-bottom: 1px #dcdfe6 solid;
393
+    margin: 0px 0 20px 0;
394
+  }
395
+
396
+  }
397
+
398
+  .title {
399
+    background: #409eff;
400
+    height: 44px;
401
+    line-height: 44px;
402
+    padding: 0 0 0 10px;
403
+    color: #fff;
404
+    margin: 0 0 10px 0;
405
+    border-radius: 4px 4px 0 0;
406
+  }
407
+
408
+  .edit_separater {
409
+    border-top: 1px solid rgb(233, 233, 233);
410
+    margin-top: 15px;
411
+    margin-bottom: 15px;
412
+  }
413
+
414
+</style>
415
+
416
+<style>
417
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
418
+    font-size: 12px;
419
+  }
420
+
421
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
422
+    background: #6fb5fa;
423
+  }
12 424
 
13 425
 </style>

+ 3 - 1
src/xt_pages/stock/salesReturnOrder.vue 查看文件

@@ -158,6 +158,7 @@
158 158
     },
159 159
     data() {
160 160
       return {
161
+        type: 1,
161 162
         page: 1,
162 163
         limit: 7,
163 164
         checked: false,
@@ -187,7 +188,8 @@
187 188
           page: this.page,
188 189
           limit: this.limit,
189 190
           start_time: this.start_time,
190
-          end_time: this.end_time
191
+          end_time: this.end_time,
192
+          type:this.type,
191 193
         }
192 194
         this.saleReturnDate = []
193 195
         getSalesReturnList(Params).then(response => {

+ 2 - 1
src/xt_pages/stock/salesReturnOrderAdd.vue 查看文件

@@ -137,6 +137,7 @@
137 137
 
138 138
     data() {
139 139
       return {
140
+        type:1,
140 141
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
141 142
         return_time: '',
142 143
         currentIndex: 0,
@@ -326,7 +327,7 @@
326 327
             const params = {
327 328
               'salesReturn': this.recordInfo.recordData
328 329
             }
329
-            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer).then(response=>{
330
+            postSalesReturn(params,this.return_time,total,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
330 331
               if (response.data.state==0) {
331 332
                 this.$message.error(response.data.msg);
332 333
                 return false;

+ 2 - 1
src/xt_pages/stock/stockInOrder.vue 查看文件

@@ -194,7 +194,8 @@
194 194
           page: this.page,
195 195
           limit: this.limit,
196 196
           start_time: this.start_time,
197
-          end_time: this.end_time
197
+          end_time: this.end_time,
198
+          type : 1,
198 199
         }
199 200
         this.Warehouse.warehouseDate = []
200 201
         getWarehouseList(Params).then(response => {

+ 51 - 39
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

@@ -10,12 +10,15 @@
10 10
     <div class="filter-container">
11 11
 
12 12
       <el-row>
13
-        <el-col :span="8"><div>
14
-          <span>入库时间:</span>
15
-          <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
-                          value-format="yyyy-MM-dd"></el-date-picker>
18
-        </div></el-col>
13
+        <el-col :span="8">
14
+          <div>
15
+            <span>入库时间:</span>
16
+            <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
17
+                            style="width: 196px;"
18
+                            type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
+                            value-format="yyyy-MM-dd"></el-date-picker>
20
+          </div>
21
+        </el-col>
19 22
 
20 23
 
21 24
         <el-col :span="8">
@@ -23,7 +26,8 @@
23 26
             <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
24 27
               <el-form-item label="厂商:" prop="manufacturer">
25 28
                 <el-select v-model="form.manufacturer" placeholder="请选择厂商">
26
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
29
+                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name"
30
+                             :value="option.id"></el-option>
27 31
                 </el-select>
28 32
               </el-form-item>
29 33
             </el-form>
@@ -34,7 +38,8 @@
34 38
             <el-form ref="form" :model="form" label-width="80px">
35 39
               <el-form-item label="经销商:">
36 40
                 <el-select v-model="form.dealer" placeholder="请选择经销商">
37
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
41
+                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name"
42
+                             :value="option.id"></el-option>
38 43
                 </el-select>
39 44
               </el-form-item>
40 45
             </el-form>
@@ -46,7 +51,7 @@
46 51
 
47 52
     <el-row>
48 53
       <el-col>
49
-        <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
54
+        <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
50 55
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
51 56
                     max-height="450"
52 57
           >
@@ -71,12 +76,14 @@
71 76
                 <span>物品类型<span style="color: red">*</span></span>
72 77
               </template>
73 78
 
74
-              <template slot-scope="scope" >
79
+              <template slot-scope="scope">
75 80
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
76 81
                 <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
77 82
 
78
-                <el-form-item  style="padding-top: 15px">
79
-                  <el-input placeholder="请输入物品类型"  v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
83
+                <el-form-item style="padding-top: 15px">
84
+                  <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
85
+                            :value="typeName(scope.row.good_type_id)"
86
+                            @focus="showDialog(scope.$index, scope.row)"></el-input>
80 87
                 </el-form-item>
81 88
 
82 89
               </template>
@@ -87,29 +94,32 @@
87 94
               </template>
88 95
               <template slot-scope="scope">
89 96
 
90
-                <el-form-item  style="padding-top: 15px">
91
-                  <el-input placeholder="请输入规格名称"  v-model="scope.row.good_id" :value="specificationName(scope.row.good_id)" @focus="showDialog(scope.$index, scope.row)" ></el-input>
97
+                <el-form-item style="padding-top: 15px">
98
+                  <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
99
+                            :value="specificationName(scope.row.good_id)"
100
+                            @focus="showDialog(scope.$index, scope.row)"></el-input>
92 101
                 </el-form-item>
93 102
 
94 103
               </template>
95 104
             </el-table-column>
96 105
 
97 106
 
98
-            <el-table-column  min-width="23" align="center">
107
+            <el-table-column min-width="23" align="center">
99 108
               <template slot="header" slot-scope="scope">
100 109
                 <span>单价<span style="color: red">*</span></span>
101 110
               </template>
102 111
               <template slot-scope="scope">
103 112
                 <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
104
-                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
105
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
113
+                <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
114
+                              style="padding-top: 17px">
115
+                  <el-input type="number" v-model="scope.row.price"></el-input>
106 116
                 </el-form-item>
107 117
 
108 118
 
109 119
               </template>
110 120
             </el-table-column>
111 121
 
112
-            <el-table-column  min-width="23" align="center">
122
+            <el-table-column min-width="23" align="center">
113 123
               <template slot="header" slot-scope="scope">
114 124
                 <span>入库数量<span style="color: red">*</span></span>
115 125
               </template>
@@ -117,8 +127,9 @@
117 127
                 <!--{{scope.row.warehousing_count}}-->
118 128
                 <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
119 129
 
120
-                <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'" :rules='tableRules.warehousing_count' style="padding-top: 17px">
121
-                  <el-input type="number"  v-model="scope.row.warehousing_count" ></el-input>
130
+                <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
131
+                              :rules='tableRules.warehousing_count' style="padding-top: 17px">
132
+                  <el-input type="number" v-model="scope.row.warehousing_count"></el-input>
122 133
                 </el-form-item>
123 134
               </template>
124 135
             </el-table-column>
@@ -129,21 +140,22 @@
129 140
               </template>
130 141
             </el-table-column>
131 142
 
132
-            <el-table-column  align="center" min-width="25">
143
+            <el-table-column align="center" min-width="25">
133 144
               <template slot="header" slot-scope="scope">
134 145
                 <span>批号<span style="color: red">*</span></span>
135 146
               </template>
136 147
               <template slot-scope="scope">
137 148
                 <!--<el-input  v-model="scope.row.numbers"></el-input>-->
138 149
 
139
-                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number' style="padding-top: 17px">
140
-                  <el-input  v-model="scope.row.number" ></el-input>
150
+                <el-form-item :prop="'recordData.' + scope.$index + '.number'" :rules='tableRules.number'
151
+                              style="padding-top: 17px">
152
+                  <el-input v-model="scope.row.number"></el-input>
141 153
                 </el-form-item>
142 154
 
143 155
               </template>
144 156
             </el-table-column>
145 157
             <el-table-column label="生产日期" min-width="40" align="center">
146
-              <template slot-scope="scope" >
158
+              <template slot-scope="scope">
147 159
                 <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
148 160
                 <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
149 161
                                 type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
@@ -154,15 +166,15 @@
154 166
             <el-table-column label="有效日期" min-width="40" align="center">
155 167
               <template slot-scope="scope">
156 168
                 <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
157
-                <el-date-picker  prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
158
-                                type="date" placeholder="选择日期时间"  format="yyyy-MM-dd"
169
+                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
170
+                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
159 171
                                 value-format="yyyy-MM-dd"></el-date-picker>
160 172
 
161 173
               </template>
162 174
             </el-table-column>
163 175
             <el-table-column label="备注" min-width="20" align="center">
164 176
               <template slot-scope="scope">
165
-                  <el-input  v-model="scope.row.remark"></el-input>
177
+                <el-input v-model="scope.row.remark"></el-input>
166 178
               </template>
167 179
             </el-table-column>
168 180
           </el-table>
@@ -170,7 +182,7 @@
170 182
       </el-col>
171 183
 
172 184
 
173
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
185
+      <span class="dialog-footer" style="margin-top: 20px;float:right">
174 186
         <el-button @click="back()">取 消</el-button>
175 187
         <el-button type="primary" @click="submit()">确 定</el-button>
176 188
       </span>
@@ -183,18 +195,18 @@
183 195
   import stockInDialog from './Dialog/stockInDialog'
184 196
   import { uParseTime } from '@/utils/tools'
185 197
 
186
-import {
187
-    GetAllGoodInfo,
188
-    GetAllGoodType,
189
-    postWarehouse,
198
+  import {
199
+    deleteWarehouseInfo,
190 200
     GetAllConfig,
201
+    GetAllGoodInfo,
191 202
     GetAllGoodInfoByID,
203
+    GetAllGoodType,
192 204
     getWarehouseInfoByOrdeNumber,
193 205
     modifyWarehouseInfo,
194
-    deleteWarehouseInfo
206
+    postWarehouse
195 207
   } from '@/api/stock'
196 208
 
197
-export default {
209
+  export default {
198 210
     components: { stockInDialog },
199 211
     name: 'stockIn',
200 212
 
@@ -240,7 +252,7 @@ export default {
240 252
           ]
241 253
 
242 254
         },
243
-
255
+        type: 1,
244 256
         total: '',
245 257
         product_date: '',
246 258
         expiry_date: '',
@@ -298,7 +310,7 @@ export default {
298 310
         dealer: [],
299 311
         goodType: []
300 312
       }
301
-  },
313
+    },
302 314
     methods: {
303 315
       handleSave: function() {
304 316
         if (this.recordInfo.recordData.length <= 0) {
@@ -325,7 +337,7 @@ export default {
325 337
       }, comfirm: function(val) {
326 338
         this.isVisibility = false
327 339
         if (val.selectedGoodInfo.length > 0) {
328
-          for (let i = val.selectedGoodInfo.length - 1; ;i--) {
340
+          for (let i = val.selectedGoodInfo.length - 1; ; i--) {
329 341
             if (i == 0) {
330 342
               this.recordInfo.recordData[this.currentIndex].good_type_id = val.goodTypeId
331 343
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
@@ -517,7 +529,7 @@ export default {
517 529
             const params = {
518 530
               'stockIn': this.recordInfo.recordData
519 531
             }
520
-            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer).then(response => {
532
+            postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
521 533
               if (response.data.state == 0) {
522 534
                 this.$message.error(response.data.msg)
523 535
                 return false
@@ -579,6 +591,7 @@ export default {
579 591
     border-bottom: 1px #dcdfe6 solid;
580 592
     margin: 0px 0 20px 0;
581 593
   }
594
+
582 595
   }
583 596
 
584 597
   .title {
@@ -588,7 +601,6 @@ export default {
588 601
     padding: 0 0 0 10px;
589 602
     color: #fff;
590 603
     margin: 0 0 10px 0;
591
-  // border-radius: 4px 4px 0 0;
592 604
   }
593 605
 
594 606
   .edit_separater {

+ 3 - 1
src/xt_pages/stock/stockOutOrder.vue 查看文件

@@ -173,6 +173,7 @@
173 173
         manufacturer: [],
174 174
         selectedTableData: [],
175 175
         dealer: [],
176
+        type:1,
176 177
 
177 178
       }
178 179
     },
@@ -185,7 +186,8 @@
185 186
           page: this.page,
186 187
           limit: this.limit,
187 188
           start_time: this.start_time,
188
-          end_time: this.end_time
189
+          end_time: this.end_time,
190
+          type: this.type,
189 191
         }
190 192
         this.warehouseOutDate = []
191 193
         getWarehouseOutList(Params).then(response => {

+ 2 - 1
src/xt_pages/stock/stockOutOrderAdd.vue 查看文件

@@ -158,6 +158,7 @@
158 158
 
159 159
     data() {
160 160
       return {
161
+        type:1,
161 162
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
162 163
         warehouse_out_time: '',
163 164
         currentIndex: 0,
@@ -353,7 +354,7 @@
353 354
             console.log(this.form.dealer)
354 355
 
355 356
 
356
-            postWarehouseOut(params,this.warehouse_out_time,this.form.dealer,this.form.manufacturer).then(response=>{
357
+            postWarehouseOut(params,this.warehouse_out_time,this.form.dealer,this.form.manufacturer,this.type).then(response=>{
357 358
               if (response.data.state==0) {
358 359
                 this.$message.error(response.data.msg);
359 360
                 return false;