XMLWAN 3 лет назад
Родитель
Сommit
235f74a297

+ 2 - 2
config/index.js Просмотреть файл

29
 
29
 
30
     // host: 'xt.test.sgjyun.com',
30
     // host: 'xt.test.sgjyun.com',
31
     //  host: 'xt.kuyicloud.com',
31
     //  host: 'xt.kuyicloud.com',
32
-  //  host: 'xt.test.sgjyun.com',
33
-    host: 'localhost',
32
+   host: 'xt.test.sgjyun.com',
33
+   // host: 'localhost',
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35
     autoOpenBrowser: true,
35
     autoOpenBrowser: true,
36
     errorOverlay: true,
36
     errorOverlay: true,

+ 32 - 0
src/api/supply.js Просмотреть файл

143
     params: params
143
     params: params
144
   })
144
   })
145
 }
145
 }
146
+
147
+export function saveGoodReturnOrder(data, warehouse_out_id, start_time, rate_of_concession, discount_amount, arrearage, payment, supplier_id) {
148
+  return request({
149
+    url: '/api/supply/savegoodreturnOrder?warehouse_out_id=' + warehouse_out_id + '&start_time=' + start_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&arrearage=' + arrearage + '&payment=' + payment + '&supplier_id=' + supplier_id,
150
+    method: 'post',
151
+    data: data
152
+  })
153
+}
154
+
155
+export function getAllGoodReturnOrderList(params) {
156
+  return request({
157
+    url: '/api/supply/getallgoodreturnorderlist',
158
+    method: 'get',
159
+    params: params
160
+  })
161
+}
162
+
163
+export function getGoodReturnDetail(id, params) {
164
+  return request({
165
+    url: '/api/supply/getgoodreturndetail?id=' + id,
166
+    method: 'get',
167
+    params: params
168
+  })
169
+}
170
+
171
+export function updateGoodReturn(data, warehouse_out_id, start_time, rate_of_concession, discount_amount, arrearage, payment, supplier_id, return_number) {
172
+  return request({
173
+    url: '/api/supply/updategoodreturn?warehouse_out_id=' + warehouse_out_id + '&start=' + start_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&arrerage=' + arrearage + '&payment=' + payment + '&supplier_id=' + supplier_id + '&return_number=' + return_number,
174
+    method: 'post',
175
+    data: data
176
+  })
177
+}

+ 9 - 0
src/router/modules/supply.js Просмотреть файл

100
       hidden: true,
100
       hidden: true,
101
       is_menu: false,
101
       is_menu: false,
102
       isChild: true
102
       isChild: true
103
+    },
104
+    {
105
+      path: '/good/return/edit',
106
+      component: () => import('@/xt_pages/supply/components/editGoodReturn'),
107
+      name: 'editGoodReturn',
108
+      meta: { title: 'editGoodReturn', noCache: true },
109
+      hidden: true,
110
+      is_menu: false,
111
+      isChild: true
103
     }
112
     }
104
 
113
 
105
   ]
114
   ]

+ 2 - 2
src/views/layout/Layout.vue Просмотреть файл

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

+ 7 - 15
src/xt_pages/supply/components/addGoodOrder.vue Просмотреть файл

597
         this.discount_amount = info.discount_amount
597
         this.discount_amount = info.discount_amount
598
         this.number = info.number
598
         this.number = info.number
599
         var orderInfo = response.data.data.orderInfo
599
         var orderInfo = response.data.data.orderInfo
600
-       
600
+        
601
         for(let i=0;i<orderInfo.length;i++){
601
         for(let i=0;i<orderInfo.length;i++){
602
           orderInfo[i].supply_batch_number = ""
602
           orderInfo[i].supply_batch_number = ""
603
           orderInfo[i].supply_product_date = ""
603
           orderInfo[i].supply_product_date = ""
665
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
665
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
666
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
666
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
667
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
667
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
668
-        if(this.recordInfo.tableList[i].id > 0){
669
-          this.recordInfo.tableList[i].type = 1
670
-        }
671
-        if(this.recordInfo.tableList[i].id == 0){
672
-          this.recordInfo.tableList[i].type = 2
673
-        }
668
+       
674
         for(let j=0;j<this.manufactuerList.length;j++){
669
         for(let j=0;j<this.manufactuerList.length;j++){
675
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
670
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
676
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
671
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
681
 
676
 
682
         }
677
         }
683
     }
678
     }
684
-    var start = this.getTimes(this.start_time)
679
+    var start = this.start_time
685
     this.$refs["tableForm"].validate((valid)=>{
680
     this.$refs["tableForm"].validate((valid)=>{
686
         if(valid){
681
         if(valid){
687
            this.loading = true
682
            this.loading = true
688
            var warehousing_id = this.$route.query.id
683
            var warehousing_id = this.$route.query.id
689
            var params = {
684
            var params = {
690
              "stockIn":this.recordInfo.tableList,
685
              "stockIn":this.recordInfo.tableList,
691
-           } 
686
+           }
687
+        console.log("stockIN2323322332322323",params)  
688
+       
692
         addGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehousing_id,this.number,this.rate_of_concession,this.discount_amount).then(response=>{
689
         addGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehousing_id,this.number,this.rate_of_concession,this.discount_amount).then(response=>{
693
           if(response.data.state == 1){
690
           if(response.data.state == 1){
694
              this.loading = false
691
              this.loading = false
761
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
758
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
762
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
759
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
763
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
760
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
764
-        if(this.recordInfo.tableList[i].id > 0){
765
-          this.recordInfo.tableList[i].type = 1
766
-        }
767
-        if(this.recordInfo.tableList[i].id == 0){
768
-          this.recordInfo.tableList[i].type = 2
769
-        }
761
+        
770
         for(let j=0;j<this.manufactuerList.length;j++){
762
         for(let j=0;j<this.manufactuerList.length;j++){
771
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
763
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
772
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
764
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id

+ 201 - 143
src/xt_pages/supply/components/addGoodReturn.vue Просмотреть файл

59
           <span>单据编码:{{ number }}</span>
59
           <span>单据编码:{{ number }}</span>
60
         </div>
60
         </div>
61
         <div>
61
         <div>
62
-          <el-button size="small" type="primary" @click="toAdd">保存</el-button>
62
+          <el-button size="small" type="primary" @click="saveGoodReturn" v-show="showOne">保存</el-button>
63
+          <el-button size="small" type="primary" @click="saveGoodReturn" v-show="showTwo">修改</el-button>
63
           <el-button size="small" type="primary" @click="updatePurchaseOrder"
64
           <el-button size="small" type="primary" @click="updatePurchaseOrder"
64
             >审核</el-button
65
             >审核</el-button
65
           >
66
           >
73
         <el-table
74
         <el-table
74
           :row-style="{ color: '#303133' }"
75
           :row-style="{ color: '#303133' }"
75
           :header-cell-style="{
76
           :header-cell-style="{
76
-            backgroundColor: 'rgb(245, 247, 250)',
77
-            color: '#606266',
77
+              backgroundColor: 'rgb(245, 247, 250)',
78
+              color: '#606266'
78
           }"
79
           }"
79
           :data="recordInfo.tableList"
80
           :data="recordInfo.tableList"
80
           :class="signAndWeighBoxPatients"
81
           :class="signAndWeighBoxPatients"
133
             </template>
134
             </template>
134
           </el-table-column>
135
           </el-table-column>
135
 
136
 
136
-          <!-- <el-table-column label="单位" align="center" width="120px">
137
-        <template slot="header" slot-scope="scope">
138
-            <span>单位<span style="color: red">*</span></span>
139
-        </template>
140
-        <template slot-scope="scope">
141
-          <el-form-item :prop="'tableList.' + scope.$index + '.supply_unit'" :rules='tableRules.supply_unit'>
142
-            <el-select v-model="scope.row.supply_unit" style="width:100px;" filterable placeholder="请选择"  :disabled="disabled">
143
-                    <el-option
144
-                        v-for="(item,index) in scope.row.unitList"
145
-                        :key="index"
146
-                        :label="item.name"
147
-                        :value="item.name">
148
-                    </el-option>
149
-             </el-select>
150
-          </el-form-item>  
151
-        </template>
152
-    </el-table-column> -->
137
+        <el-table-column label="单位" align="center" width="120px">
138
+            <template slot="header" slot-scope="scope">
139
+                <span>单位<span style="color: red">*</span></span>
140
+            </template>
141
+            <template slot-scope="scope">
142
+              <el-form-item :prop="'tableList.' + scope.$index + '.supply_unit'" :rules='tableRules.supply_unit'>
143
+                <el-select v-model="scope.row.supply_unit" style="width:100px;" filterable placeholder="请选择"  :disabled="disabled">
144
+                        <!-- <el-option
145
+                            v-for="(item,index) in scope.row.unitList"
146
+                            :key="index"
147
+                            :label="item.name"
148
+                            :value="item.name">
149
+                        </el-option> -->
150
+                </el-select>
151
+              </el-form-item>  
152
+            </template>
153
+          </el-table-column>
153
           <el-table-column label="可用库存" align="center" width="130px">
154
           <el-table-column label="可用库存" align="center" width="130px">
154
             <template slot-scope="scope">
155
             <template slot-scope="scope">
155
               <el-input
156
               <el-input
226
           <el-table-column label="关联采购订单号" align="center" width="200px">
227
           <el-table-column label="关联采购订单号" align="center" width="200px">
227
             <template slot-scope="scope">
228
             <template slot-scope="scope">
228
               <el-input
229
               <el-input
229
-                v-model="scope.row.supply_license_number"
230
+                v-model="scope.row.order_number"
230
                 style="width: 160px"
231
                 style="width: 160px"
231
-                :disabled="disabled"
232
+                :disabled="true"
232
               ></el-input>
233
               ></el-input>
233
             </template>
234
             </template>
234
           </el-table-column>
235
           </el-table-column>
236
           <el-table-column label="源购货订单号" align="center" width="200px">
237
           <el-table-column label="源购货订单号" align="center" width="200px">
237
             <template slot-scope="scope">
238
             <template slot-scope="scope">
238
               <el-input
239
               <el-input
239
-                v-model="scope.row.supply_license_number"
240
+                v-model="scope.row.good_number"
240
                 style="width: 160px"
241
                 style="width: 160px"
241
-                :disabled="disabled"
242
+                :disabled="true"
242
               ></el-input>
243
               ></el-input>
243
             </template>
244
             </template>
244
           </el-table-column>
245
           </el-table-column>
253
             </template>
254
             </template>
254
           </el-table-column>
255
           </el-table-column>
255
 
256
 
256
-          <el-table-column
257
-            label="操作"
258
-            align="center"
259
-            width="150px"
260
-            fixed="right"
261
-          >
257
+          <el-table-column label="操作" align="center" width="150px" fixed="right">
262
             <template slot-scope="scope">
258
             <template slot-scope="scope">
263
-              <el-tooltip
264
-                class="item"
265
-                effect="dark"
266
-                content="新增"
267
-                placement="top"
268
-              >
269
-                <el-button
270
-                  size="mini"
271
-                  type="primary"
272
-                  icon="el-icon-circle-plus-outline"
273
-                  @click="handleEdit(scope.$index, scope.row)"
274
-                >
275
-                </el-button>
276
-              </el-tooltip>
277
-              <el-tooltip
278
-                class="item"
279
-                effect="dark"
280
-                content="删除"
281
-                placement="top"
282
-              >
283
-                <el-button
284
-                  size="mini"
285
-                  type="danger"
286
-                  icon="el-icon-delete"
287
-                  @click="handleDelete(scope.$index, scope.row)"
288
-                >
289
-                </el-button>
259
+              <el-tooltip class="item" effect="dark" content="新增" placement="top" >
260
+                  <el-button
261
+                      size="mini"
262
+                      type="primary"
263
+                      icon="el-icon-circle-plus-outline"
264
+                      @click="handleEdit(scope.$index, scope.row)">
265
+                  </el-button>
266
+            </el-tooltip>
267
+            <el-tooltip class="item" effect="dark" content="删除" placement="top">
268
+                  <el-button
269
+                      size="mini"
270
+                      type="danger"
271
+                      icon="el-icon-delete"
272
+                      @click="handleDelete(scope.$index, scope.row)">
273
+                  </el-button>
290
               </el-tooltip>
274
               </el-tooltip>
291
             </template>
275
             </template>
292
-          </el-table-column>
276
+         </el-table-column>
293
         </el-table>
277
         </el-table>
294
       </el-form>
278
       </el-form>
295
       <div style="margin-top: 10px">
279
       <div style="margin-top: 10px">
296
-        <!-- 合计:{{getAllPrice()}} 元 -->
297
         <el-input
280
         <el-input
298
           type="textarea"
281
           type="textarea"
299
           :rows="2"
282
           :rows="2"
300
-          placeholder="备注信息"
301
-          v-model="tipsInfo"
283
+          placeholder="备注信息"
284
+          v-model="return_remark"
302
         >
285
         >
303
         </el-input>
286
         </el-input>
304
       </div>
287
       </div>
321
         <span
304
         <span
322
           >本次付款:<el-input
305
           >本次付款:<el-input
323
             style="width: 100px"
306
             style="width: 100px"
324
-            v-model="discount_amount"
307
+            v-model="payment"
325
           ></el-input
308
           ></el-input
326
         ></span>
309
         ></span>
327
 
310
 
328
         <span
311
         <span
329
           >本次欠款:<el-input
312
           >本次欠款:<el-input
330
             style="width: 100px"
313
             style="width: 100px"
331
-            v-model="discount_amount"
314
+            v-model="arrearage"
332
           ></el-input
315
           ></el-input
333
         ></span>
316
         ></span>
334
       </div>
317
       </div>
335
     </div>
318
     </div>
336
 
319
 
337
-    <!-- <el-dialog
338
-  title="提示"
339
-  :visible.sync="dialogVisible"
340
-  width="30%"
341
-  :before-close="handleClose">
342
-  <span>这是一段信息</span>
343
-  <span slot="footer" class="dialog-footer">
344
-    <el-button @click="dialogVisible = false">取 消</el-button>
345
-    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
346
-  </span>
347
-  </el-dialog> -->
348
   </div>
320
   </div>
349
 </template>
321
 </template>
350
 
322
 
353
 import { uParseTime } from "@/utils/tools";
325
 import { uParseTime } from "@/utils/tools";
354
 import {
326
 import {
355
   getInitOrder,
327
   getInitOrder,
356
-  updatePurchaseOrder,
357
-  checkPurchaseOrder,
358
-  getPurchaseOrderDetail,
328
+  getGoodOrderDetail,
329
+  saveGoodReturnOrder
359
 } from "@/api/supply";
330
 } from "@/api/supply";
360
 export default {
331
 export default {
361
   name: "addPurchaseOrder",
332
   name: "addPurchaseOrder",
369
         { path: false, name: "购货单" },
340
         { path: false, name: "购货单" },
370
         { path: "/good/return/add", name: "新增退货单" },
341
         { path: "/good/return/add", name: "新增退货单" },
371
       ],
342
       ],
372
-      showTwo: true,
373
-      showOne: false,
343
+      showTwo: false,
344
+      showOne: true,
374
       recordInfo: {
345
       recordInfo: {
375
         tableList: [1],
346
         tableList: [1],
376
       },
347
       },
398
       supplier_name: "",
369
       supplier_name: "",
399
       supplyList: [],
370
       supplyList: [],
400
       rate_of_concession: "",
371
       rate_of_concession: "",
372
+      arrearage:"",
373
+      payment:"",
401
       discount_amount: "",
374
       discount_amount: "",
402
-      start_time: new Date(),
403
-      end_time: new Date(),
404
       tableRules: {
375
       tableRules: {
405
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
376
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
406
         supply_count: [
377
         supply_count: [
416
       disabled: false,
387
       disabled: false,
417
       is_check: 0,
388
       is_check: 0,
418
       dialogVisible: false,
389
       dialogVisible: false,
390
+      return_remark:"",
419
     };
391
     };
420
   },
392
   },
421
   methods: {
393
   methods: {
542
       this.currentIndex = val;
514
       this.currentIndex = val;
543
     },
515
     },
544
     changeName(val) {
516
     changeName(val) {
545
-      //var obj = {"id":0,"name":"合计","supply_name":"","supply_type":"","supply_specification_name":"","supply_total":"","supply_count":"","supply_price":"","supply_total_price":"","supply_manufacturer":"","supply_license_number":"","supply_remake":"","is_total":2}
546
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
517
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
547
         if (this.currentIndex == i) {
518
         if (this.currentIndex == i) {
548
           this.recordInfo.tableList[i].project_id = val.id;
519
           this.recordInfo.tableList[i].project_id = val.id;
745
         })
716
         })
746
         .catch(() => {});
717
         .catch(() => {});
747
     },
718
     },
748
-    getPurchaseOrderDetail() {
749
-      console.log("处方233223232323322323232323");
750
-      var id = this.$route.query.id;
751
-      getPurchaseOrderDetail(id).then((response) => {
752
-        if (response.data.state == 1) {
753
-          var info = response.data.data.info;
754
-          this.is_check = info.is_check;
755
-          this.number = info.number;
756
-          this.id = info.id;
757
-          this.supplier_name = info.supplier_id;
758
-          this.rate_of_concession = info.rate_of_concession;
759
-          this.discount_amount = info.discount_amount;
760
-          var orderInfo = response.data.data.orderInfo;
761
-          if (info.is_check == 2) {
762
-            this.disabled = false;
719
+    getGoodOrderDetail(){
720
+      
721
+        var id = this.$route.query.id
722
+      getGoodOrderDetail(id).then(response=>{
723
+        if(response.data.state == 1){
724
+          var out = response.data.data.out
725
+          this.is_check = out.is_check
726
+          this.id = out.id
727
+          this.supplier_name = out.supplier_id
728
+          this.rate_of_concession = out.rate_of_concession
729
+          this.discount_amount = out.discount_amount
730
+          this.payment = out.payment
731
+          this.arrearage = out.arrearage
732
+          this.start_time = this.getTimes(out.document_date)
733
+          var orderInfo = response.data.data.list
734
+          console.log("orderINFO233232232332",orderInfo)
735
+          var drugList = response.data.data.drugList
736
+          var goodList = response.data.data.goodList
737
+          for(let i=0;i< orderInfo.length;i++){
738
+              
739
+              orderInfo[i].supply_count =  orderInfo[i].count
740
+              orderInfo[i].supply_price =  orderInfo[i].price
741
+              orderInfo[i].supply_remake =  orderInfo[i].remark
742
+              orderInfo[i].type =  orderInfo[i].is_source
743
+              orderInfo[i].project_id =  orderInfo[i].project_id
744
+              orderInfo[i].supply_unit =  orderInfo[i].supply_unit
745
+              orderInfo[i].order_number =  orderInfo[i].order_number
746
+              orderInfo[i].good_number = orderInfo[i].good_number
747
+              orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
748
+              orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
749
+              orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
750
+            if(orderInfo[i].is_source == 1){
751
+              for(let j=0;j<drugList.length;j++){
752
+                  if( orderInfo[i].project_id == drugList[j].id){
753
+                    if(drugList[j].max_unit!=drugList[j].min_unit){
754
+                      orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
755
+                      orderInfo[i].unitList[0].name = drugList[j].max_unit
756
+                      orderInfo[i].unitList[1].name = drugList[j].min_unit
757
+                    }
758
+                    if(drugList[j].max_unit ==drugList[j].min_unit){
759
+                      orderInfo[i].unitList = [{id:1,name:""}]
760
+                      orderInfo[i].unitList[0].name = drugList[j].max_unit
761
+                    }
762
+                  
763
+                  }
764
+              }  
765
+              } 
766
+            if(orderInfo[i].is_source == 2){
767
+              for(let j=0;j<goodList.length;j++){
768
+                  if(orderInfo[i].project_id == goodList[j].id){
769
+                      orderInfo[i].unitList = [{id:1,name:""}]
770
+                      orderInfo[i].unitList[0].name = goodList[j].packing_unit
771
+                  }
772
+              }  
773
+            } 
763
           }
774
           }
764
-          if (info.is_check == 1) {
765
-            this.disabled = true;
766
-          }
767
-          console.log("drugli323322332", this.drugList);
768
-          var drugList = response.data.data.baseList;
769
-          var goodList = response.data.data.goodList;
770
-          for (let i = 0; i < orderInfo.length; i++) {
771
-            orderInfo[i].supply_count = orderInfo[i].count;
772
-            orderInfo[i].supply_price = orderInfo[i].price;
773
-            orderInfo[i].supply_remake = orderInfo[i].remark;
774
-            orderInfo[i].type = orderInfo[i].is_source;
775
-            orderInfo[i].project_id = orderInfo[i].project_id;
776
-            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
777
-            if (orderInfo[i].is_source == 1) {
778
-              for (let j = 0; j < drugList.length; j++) {
779
-                if (orderInfo[i].project_id == drugList[j].id) {
780
-                  orderInfo[i].unitList = [
781
-                    { id: 1, name: "" },
782
-                    { id: 2, name: "" },
783
-                  ];
784
-                  orderInfo[i].unitList[0].name = drugList[j].max_unit;
785
-                  orderInfo[i].unitList[1].name = drugList[j].min_unit;
786
-                }
787
-              }
788
-            }
789
-            if (orderInfo[i].is_source == 2) {
790
-              for (let j = 0; j < goodList.length; j++) {
791
-                if (orderInfo[i].project_id == goodList[j].id) {
792
-                  orderInfo[i].unitList = [{ id: 1, name: "" }];
793
-                  orderInfo[i].unitList[0].name = goodList[j].packing_unit;
794
-                }
795
-              }
796
-            }
797
-          }
798
-          console.log("orderINFO23323232", orderInfo);
799
-          this.recordInfo.tableList = orderInfo;
775
+        
776
+          this.recordInfo.tableList= []
777
+          this.recordInfo.tableList = orderInfo
778
+        
800
         }
779
         }
801
-      });
780
+      })  
802
     },
781
     },
803
     toPrint() {
782
     toPrint() {
804
       var id = this.$route.query.id;
783
       var id = this.$route.query.id;
805
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
784
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
806
     },
785
     },
807
-    toAdd() {
808
-      var id = this.$route.query.id;
809
-      if (this.is_check == 2) {
810
-        this.$message.error("该采购订单未审核,不能生成采购数据!");
811
-        return false;
812
-      }
813
-      this.$router.push({ path: "/purchase/order/add?id=" + id });
814
-    },
786
+    saveGoodReturn(){
787
+      var warehouse_out_id = this.$route.query.id;
788
+      this.$refs["tableForm"].validate((valid)=>{
789
+        if(valid){
790
+          this.loading = true
791
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
792
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
793
+            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
794
+            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
795
+       
796
+            for(let j=0;j<this.manufactuerList.length;j++){
797
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
798
+                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
799
+                }
800
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
801
+                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
802
+                }
803
+
804
+            }
805
+          }
806
+          var params = {
807
+            "stockIn":this.recordInfo.tableList,
808
+            "return_marke":this.return_remark,
809
+          }
810
+          console.log("start_time232233232",this.start_time)
811
+          
812
+          saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
813
+            if(response.data.state == 1){
814
+               this.loading = false
815
+               this.showOne = false
816
+               this.showTwo = true
817
+               this.$message.success("保存成功!")
818
+               var warehouseCancel = response.data.data.warehouseCancel
819
+               var out = response.data.data.cancelOrder
820
+               this.id = out.id
821
+               this.supplier_name = out.supplier_id
822
+               this.rate_of_concession = out.rate_of_concession
823
+               this.discount_amount = out.discount_amount
824
+               this.payment = out.payment
825
+               this.arrearage = out.arrearage
826
+               this.start_time = this.getTimes(out.document_date)
827
+               var orderInfo = response.data.data.list
828
+               for(let i=0;i< orderInfo.length;i++){
829
+                orderInfo[i].supply_count =  orderInfo[i].count
830
+                orderInfo[i].supply_price =  orderInfo[i].price
831
+                orderInfo[i].supply_remake =  orderInfo[i].remark
832
+                orderInfo[i].type =  orderInfo[i].is_source
833
+                orderInfo[i].project_id =  orderInfo[i].project_id
834
+                orderInfo[i].supply_unit =  orderInfo[i].supply_unit
835
+                orderInfo[i].order_number =  orderInfo[i].order_number
836
+                orderInfo[i].good_number = orderInfo[i].good_number
837
+                orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
838
+                orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
839
+                orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
840
+                if(orderInfo[i].is_source == 1){
841
+                  for(let j=0;j<this.drugList.length;j++){
842
+                      if( orderInfo[i].project_id == this.drugList[j].id){
843
+                        if(this.drugList[j].max_unit!=this.drugList[j].min_unit){
844
+                          orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
845
+                          orderInfo[i].unitList[0].name = this.drugList[j].max_unit
846
+                          orderInfo[i].unitList[1].name = this.drugList[j].min_unit
847
+                        }
848
+                        if(this.drugList[j].max_unit ==this.drugList[j].min_unit){
849
+                          orderInfo[i].unitList = [{id:1,name:""}]
850
+                          orderInfo[i].unitList[0].name = this.drugList[j].max_unit
851
+                        }
852
+                      
853
+                      }
854
+                  }  
855
+                  } 
856
+                if(orderInfo[i].is_source == 2){
857
+                  for(let j=0;j<this.goodList.length;j++){
858
+                      if(orderInfo[i].project_id == this.goodList[j].id){
859
+                          orderInfo[i].unitList = [{id:1,name:""}]
860
+                          orderInfo[i].unitList[0].name = this.goodList[j].packing_unit
861
+                      }
862
+                  }  
863
+                } 
864
+              }
865
+              this.recordInfo.tableList= []
866
+              this.recordInfo.tableList = orderInfo
867
+            }
868
+          })
869
+        }
870
+      })
871
+    }
815
   },
872
   },
816
   created() {
873
   created() {
817
     const tempObj = {};
874
     const tempObj = {};
833
     tempObj["supply_unit"] = "";
890
     tempObj["supply_unit"] = "";
834
     this.recordInfo.tableList.push(tempObj);
891
     this.recordInfo.tableList.push(tempObj);
835
     this.getInitOrder();
892
     this.getInitOrder();
836
-    this.getPurchaseOrderDetail();
893
+    //获取购货单列表
894
+    this.getGoodOrderDetail();
837
   },
895
   },
838
 };
896
 };
839
 </script>
897
 </script>

+ 26 - 31
src/xt_pages/supply/components/editGoodOrder.vue Просмотреть файл

7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8
     <div>
8
     <div>
9
         <span style="color:red">*</span><span>供应商:</span>
9
         <span style="color:red">*</span><span>供应商:</span>
10
-        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
11
-        @change="changeTypeName">
10
+        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择">
12
         <el-option
11
         <el-option
13
             v-for="item in supplyList"
12
             v-for="item in supplyList"
14
             :key="item.id"
13
             :key="item.id"
49
     </div>
48
     </div>
50
     <div>
49
     <div>
51
         <el-button size="small" type="primary" @click="updateGoodOrder">修改</el-button>
50
         <el-button size="small" type="primary" @click="updateGoodOrder">修改</el-button>
52
-        <el-button size="small" type="primary"  @click="checkGoodOrder">审核</el-button>
51
+        <el-button size="small" type="primary"  @click="toClick" v-show="showThree">生成采购退货单</el-button>
52
+        <el-button size="small" type="primary"  v-show="showOne">审核</el-button>
53
+        <el-button size="small" type="primary"  v-show="showTwo">反审核</el-button>
53
 
54
 
54
        
55
        
55
     </div>
56
     </div>
278
        { path: false, name: "采购单" },
279
        { path: false, name: "采购单" },
279
        { path: "/supply/good/order/query", name: "编辑采购单" }
280
        { path: "/supply/good/order/query", name: "编辑采购单" }
280
     ],
281
     ],
281
-    showTwo:true,
282
-    showOne:false,
282
+    showOne:true,
283
+    showTwo:false,
284
+    showThree:false,
283
     recordInfo: {
285
     recordInfo: {
284
       tableList:[],
286
       tableList:[],
285
     },
287
     },
330
    payment:"",
332
    payment:"",
331
    good_number:"",
333
    good_number:"",
332
    orderInfo:[],
334
    orderInfo:[],
333
-   showOne:true,
334
-   showTwo:false,
335
    warese_out_id:0,
335
    warese_out_id:0,
336
+   
336
   };
337
   };
337
 },
338
 },
338
 methods:{
339
 methods:{
493
     tempObj["manufacturer_id"] = ""
494
     tempObj["manufacturer_id"] = ""
494
     tempObj["warehouse_info_id"] = ""
495
     tempObj["warehouse_info_id"] = ""
495
     tempObj["warehousing_id"]= ""
496
     tempObj["warehousing_id"]= ""
497
+    tempObj["number"] = ""
498
+    tempObj["good_number"] = ""
496
     this.recordInfo.tableList.push(tempObj)
499
     this.recordInfo.tableList.push(tempObj)
497
 },
500
 },
498
 handleDelete: function(index, row) {
501
 handleDelete: function(index, row) {
504
    }
507
    }
505
 },
508
 },
506
 
509
 
507
-changeTypeName(){
508
-
509
-},
510
-startTimeChange(){
511
-
512
-},
513
-endTimeChange(){
514
-
515
-},
516
-search(){
517
-
518
-},
519
-
520
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
510
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
521
     var total = 0
511
     var total = 0
522
     var max_str=  ""
512
     var max_str=  ""
598
       if(response.data.state == 1){
588
       if(response.data.state == 1){
599
         var out = response.data.data.out
589
         var out = response.data.data.out
600
         this.is_check = out.is_check
590
         this.is_check = out.is_check
591
+        if(out.is_check == 1){
592
+          this.showOne = false
593
+          this.showTwo = true
594
+          this.showThree = true
595
+        }
596
+
601
         this.id = out.id
597
         this.id = out.id
602
         this.supplier_name = out.supplier_id
598
         this.supplier_name = out.supplier_id
603
         this.rate_of_concession = out.rate_of_concession
599
         this.rate_of_concession = out.rate_of_concession
651
       
647
       
652
         this.recordInfo.tableList= []
648
         this.recordInfo.tableList= []
653
         this.recordInfo.tableList = orderInfo
649
         this.recordInfo.tableList = orderInfo
654
-       
655
-          console.log("orderINFO23323232",this.recordInfo.tableList)
650
+      
656
       }
651
       }
657
     })  
652
     })  
658
   },
653
   },
667
        this.loading = false
662
        this.loading = false
668
        return false
663
        return false
669
     } 
664
     } 
670
-    console.log("表哥2323233232",this.recordInfo.tableList)
671
     for(let i=0;i<this.recordInfo.tableList.length;i++){
665
     for(let i=0;i<this.recordInfo.tableList.length;i++){
672
 
666
 
673
         this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
667
         this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
674
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
668
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
675
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
669
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
676
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
670
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
677
-        if(this.recordInfo.tableList[i].id > 0){
678
-          this.recordInfo.tableList[i].type = 1
679
-        }
680
-        if(this.recordInfo.tableList[i].id == 0){
681
-          this.recordInfo.tableList[i].type = 2
682
-        }
671
+       
683
         for(let j=0;j<this.manufactuerList.length;j++){
672
         for(let j=0;j<this.manufactuerList.length;j++){
684
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
673
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
685
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
674
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
698
            var params = {
687
            var params = {
699
              "stockIn":this.recordInfo.tableList,
688
              "stockIn":this.recordInfo.tableList,
700
            } 
689
            } 
701
-           console.log("sotckind23232232323232323232",params)
702
-           
703
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
690
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
704
            if(response.data.state == 1){
691
            if(response.data.state == 1){
705
              this.loading = false
692
              this.loading = false
716
     getGoodOrderCountList(id,warehousing_id).then(response=>{
703
     getGoodOrderCountList(id,warehousing_id).then(response=>{
717
       if(response.data.state == 1){
704
       if(response.data.state == 1){
718
         this.$message.success("审核成功!")
705
         this.$message.success("审核成功!")
706
+        this.showOne = false
707
+        this.showTwo = true
708
+        this.showThree = true
719
         var purcaseOrder = response.data.data.purcaseOrder
709
         var purcaseOrder = response.data.data.purcaseOrder
720
         console.log("采购订单",purcaseOrder)
710
         console.log("采购订单",purcaseOrder)
721
         
711
         
817
         var msg = response.data.data.msg
807
         var msg = response.data.data.msg
818
       }
808
       }
819
     })
809
     })
810
+  },
811
+  toClick(){
812
+    this.$router.push({path:"/good/return/add?id="+this.id})
820
   }
813
   }
821
 },
814
 },
822
 created(){
815
 created(){
844
     tempObj["manufacturer_id"] = ""
837
     tempObj["manufacturer_id"] = ""
845
     tempObj["warehouse_info_id"] = ""
838
     tempObj["warehouse_info_id"] = ""
846
     tempObj["warehousing_id"]= ""
839
     tempObj["warehousing_id"]= ""
840
+    tempObj["number"] = ""
841
+    tempObj["good_number"] = ""
847
     this.recordInfo.tableList.push(tempObj)
842
     this.recordInfo.tableList.push(tempObj)
848
     this.getInitOrder()
843
     this.getInitOrder()
849
     if(parseInt(this.$route.query.id) > 0){
844
     if(parseInt(this.$route.query.id) > 0){

+ 3 - 0
src/xt_pages/supply/components/editPurchaseOrder.vue Просмотреть файл

535
               if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
535
               if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
536
                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
536
                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
537
               }
537
               }
538
+              if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
539
+                this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
540
+              }
538
            }
541
            }
539
         }
542
         }
540
         var start = this.start_time
543
         var start = this.start_time

+ 34 - 14
src/xt_pages/supply/goodOrderQuery.vue Просмотреть файл

102
         </el-table-column>
102
         </el-table-column>
103
         <el-table-column label="优惠后金额" align="center">
103
         <el-table-column label="优惠后金额" align="center">
104
          <template slot-scope="scope">
104
          <template slot-scope="scope">
105
-           {{getAllCount(scope.row.orderOut)}}
105
+           {{getAllMoney(scope.row.discount_amount,scope.row.orderOut)}}
106
          </template>
106
          </template>
107
        </el-table-column>
107
        </el-table-column>
108
         <el-table-column label="已付款" align="center">
108
         <el-table-column label="已付款" align="center">
109
          <template slot-scope="scope">
109
          <template slot-scope="scope">
110
-           {{getAllCount(scope.row.orderInfo)}}
110
+           {{scope.row.payment}}
111
          </template>
111
          </template>
112
        </el-table-column>
112
        </el-table-column>
113
        <el-table-column label="数量" align="center">
113
        <el-table-column label="数量" align="center">
221
        this.$router.push({path:"/good/order/add?id="+id})
221
        this.$router.push({path:"/good/order/add?id="+id})
222
      },
222
      },
223
      changeTypeName(){
223
      changeTypeName(){
224
-
224
+       this.getlist()
225
      },
225
      },
226
      startTimeChange(){
226
      startTimeChange(){
227
-
227
+      this.getlist()
228
      },
228
      },
229
      endTimeChange(){
229
      endTimeChange(){
230
-
230
+      this.getlist()
231
      },
231
      },
232
      search(){
232
      search(){
233
-
233
+       this.getlist()
234
      },
234
      },
235
      handleSizeChange(val){
235
      handleSizeChange(val){
236
        this.limit = val
236
        this.limit = val
251
          }
251
          }
252
        })
252
        })
253
      },
253
      },
254
-     changeTypeName(){
255
 
254
 
256
-     },
257
      getTimes(time) {
255
      getTimes(time) {
258
       if (time === '') {
256
       if (time === '') {
259
       return ''
257
       return ''
263
      getlist(){
261
      getlist(){
264
         var params = {
262
         var params = {
265
           check_id:this.check_id,
263
           check_id:this.check_id,
266
-          start_time:this.getTimes(this.start_time),
267
-          end_time:this.getTimes(this.end_time),
264
+          start_time:this.start_time,
265
+          end_time:this.end_time,
268
           keyword:this.keywords,
266
           keyword:this.keywords,
269
           page:this.page,
267
           page:this.page,
270
           limit:this.limit,
268
           limit:this.limit,
271
         }
269
         }
270
+       console.log("param2323322332",params)
272
        getAllGoodOrderList(params).then(response=>{
271
        getAllGoodOrderList(params).then(response=>{
273
           if(response.data.state == 1){
272
           if(response.data.state == 1){
274
             var list = response.data.data.list 
273
             var list = response.data.data.list 
307
        return buy_price.toFixed(2)
306
        return buy_price.toFixed(2)
308
      },
307
      },
309
      getAllCount(arr){
308
      getAllCount(arr){
310
-       var count = ""
309
+       var count = 0
311
         if(arr!=undefined && arr.length > 0){
310
         if(arr!=undefined && arr.length > 0){
312
           for(let i=0;i<arr.length;i++){
311
           for(let i=0;i<arr.length;i++){
313
-            count += arr[i].count
312
+            count += parseInt(arr[i].count)
314
           }
313
           }
315
        }
314
        }
316
-       return count
315
+       if(count == 0){
316
+         return ""
317
+       }
318
+       if(count >0){
319
+        return count
320
+       }
321
+     
322
+     },
323
+     getAllMoney(paycount,arr){
324
+       var all_price= 0
325
+       if(arr!=undefined && arr.length > 0){
326
+         for(let i=0;i<arr.length;i++){
327
+          all_price += arr[i].count * arr[i].price
328
+         }
329
+       }
330
+       if(all_price == 0){
331
+         return ""
332
+       }
333
+       if(all_price >0){
334
+
335
+         return (all_price - all_price * (paycount/100)).toFixed(2)
336
+       }
337
+      
317
      },
338
      },
318
      toClick(val){
339
      toClick(val){
319
-       console.log("val3232232323",val)
320
        this.$router.push({path:"/good/order/edit?id="+val.id+"&warehousing_id="+val.warehousing_id})
340
        this.$router.push({path:"/good/order/edit?id="+val.id+"&warehousing_id="+val.warehousing_id})
321
      }
341
      }
322
   },
342
   },

+ 40 - 31
src/xt_pages/supply/goodreturn.vue Просмотреть файл

66
 
66
 
67
 
67
 
68
        <el-table
68
        <el-table
69
-        :row-style="{ color: '#303133' }"
70
-        :header-cell-style="{
71
-          backgroundColor: 'rgb(245, 247, 250)',
72
-          color: '#606266'
73
-        }"
74
-        :data="tableList"
75
-        :class="signAndWeighBoxPatients"
76
-        border
69
+          :row-style="{ color: '#303133' }"
70
+          :header-cell-style="{
71
+              backgroundColor: 'rgb(245, 247, 250)',
72
+              color: '#606266'
73
+          }"
74
+          :data="tableList"
75
+          :class="signAndWeighBoxPatients"
76
+          border
77
+          style="width: 100%"
78
+          max-height="450"
79
+         
77
       >
80
       >
78
-        <el-table-column label="单据日期" align="center">
81
+        <el-table-column label="单据日期" align="center" width="200">
79
           <template slot-scope="scope">
82
           <template slot-scope="scope">
80
             <span>{{getTimes(scope.row.document_date)}}</span>
83
             <span>{{getTimes(scope.row.document_date)}}</span>
81
          </template>
84
          </template>
82
         </el-table-column>
85
         </el-table-column>
83
-        <el-table-column label="单据编号" align="center">
86
+        <el-table-column label="单据编号" align="center" width="200">
84
           <template slot-scope="scope">
87
           <template slot-scope="scope">
85
             <span>{{scope.row.number}}</span>
88
             <span>{{scope.row.number}}</span>
86
           </template>
89
           </template>
87
         </el-table-column>
90
         </el-table-column>
88
-        <el-table-column label="供应商" align="center">
91
+        <el-table-column label="供应商" align="center" width="200">
89
             <template slot-scope="scope">
92
             <template slot-scope="scope">
90
               <span>{{getName(scope.row.supplier_id)}}</span>
93
               <span>{{getName(scope.row.supplier_id)}}</span>
91
             </template>
94
             </template>
92
          </el-table-column>
95
          </el-table-column>
93
         <el-table-column label="关联购货订单号" align="center" width="200">
96
         <el-table-column label="关联购货订单号" align="center" width="200">
94
           <template slot-scope="scope">
97
           <template slot-scope="scope">
95
-            
98
+            <span v-if="scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].order_number}}</span>
96
           </template>
99
           </template>
97
         </el-table-column>
100
         </el-table-column>
98
            <el-table-column label="源采购单号" align="center" width="200">
101
            <el-table-column label="源采购单号" align="center" width="200">
99
           <template slot-scope="scope">
102
           <template slot-scope="scope">
100
-            
103
+             <span v-if="scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].good_number}}</span>
101
           </template>
104
           </template>
102
         </el-table-column>
105
         </el-table-column>
103
-        <el-table-column label="购货金额" align="center">
106
+        <el-table-column label="购货金额" align="center" width="200">
104
           <template slot-scope="scope">
107
           <template slot-scope="scope">
105
-             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
108
+             <!-- <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span>  -->
106
           </template>
109
           </template>
107
         </el-table-column>
110
         </el-table-column>
108
-        <el-table-column label="优惠后金额" align="center">
111
+        <el-table-column label="优惠后金额" align="center" width="200">
109
          <template slot-scope="scope">
112
          <template slot-scope="scope">
110
-           {{getAllCount(scope.row.orderInfo)}}
113
+           <!-- {{getAllCount(scope.row.orderInfo)}} -->
111
          </template>
114
          </template>
112
        </el-table-column>
115
        </el-table-column>
113
-        <el-table-column label="已退款" align="center">
116
+        <el-table-column label="已退款" align="center" width="200">
114
          <template slot-scope="scope">
117
          <template slot-scope="scope">
115
-           {{getAllCount(scope.row.orderInfo)}}
118
+           <!-- {{getAllCount(scope.row.orderInfo)}} -->
116
          </template>
119
          </template>
117
        </el-table-column>
120
        </el-table-column>
118
-       <el-table-column label="源数量" align="center">
121
+       <el-table-column label="源数量" align="center" width="200">
119
          <template slot-scope="scope">
122
          <template slot-scope="scope">
120
-           {{getAllCount(scope.row.orderInfo)}}
123
+           <!-- {{getAllCount(scope.row.orderInfo)}} -->
121
          </template>
124
          </template>
122
        </el-table-column>
125
        </el-table-column>
123
 
126
 
124
-       <el-table-column label="退款状态" align="center">
127
+       <el-table-column label="退款状态" align="center" width="200">
125
          <template slot-scope="scope">
128
          <template slot-scope="scope">
126
            <span v-if="scope.row.is_check == 2">未审核</span>
129
            <span v-if="scope.row.is_check == 2">未审核</span>
127
            <span v-if="scope.row.is_check == 1">已审核</span>
130
            <span v-if="scope.row.is_check == 1">已审核</span>
129
        </el-table-column>
132
        </el-table-column>
130
       
133
       
131
           
134
           
132
-      <el-table-column label="制单人" align="center">
135
+      <el-table-column label="制单人" align="center" width="200">
133
          <template slot-scope="scope">
136
          <template slot-scope="scope">
134
           {{getDocName(scope.row.creater)}}
137
           {{getDocName(scope.row.creater)}}
135
          </template>
138
          </template>
136
        </el-table-column>
139
        </el-table-column>
137
 
140
 
138
-      <el-table-column label="审核人" align="center">
141
+      <el-table-column label="审核人" align="center" width="200">
139
          <template slot-scope="scope">
142
          <template slot-scope="scope">
140
           {{getDocName(scope.row.checker)}}
143
           {{getDocName(scope.row.checker)}}
141
          </template>
144
          </template>
142
        </el-table-column>
145
        </el-table-column>
143
 
146
 
144
-       <el-table-column label="操作" align="center" width="260px">
147
+       <el-table-column label="操作" align="center" width="260"  fixed="right">
145
           <template slot-scope="scope">
148
           <template slot-scope="scope">
146
               <el-button
149
               <el-button
147
                 icon="el-icon-edit-outline"
150
                 icon="el-icon-edit-outline"
148
                 size="small"
151
                 size="small"
149
                 type="primary"
152
                 type="primary"
150
-                @click="toClick(scope.row.id)"
153
+                @click="editGoodReturn(scope.row.id)"
151
               >编辑
154
               >编辑
152
               </el-button>
155
               </el-button>
153
               <el-button
156
               <el-button
180
 <script>
183
 <script>
181
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
184
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
182
 
185
 
183
-import {getAllSupply,getAllPurchaseOrderList} from "@/api/supply"
186
+import {getAllSupply,getAllGoodReturnOrderList} from "@/api/supply"
184
 import {uParseTime } from '@/utils/tools'
187
 import {uParseTime } from '@/utils/tools'
185
 export default {
188
 export default {
186
   name: "stockIn",
189
   name: "stockIn",
273
           page:this.page,
276
           page:this.page,
274
           limit:this.limit,
277
           limit:this.limit,
275
         }
278
         }
276
-       getAllPurchaseOrderList(params).then(response=>{
279
+       getAllGoodReturnOrderList(params).then(response=>{
277
           if(response.data.state == 1){
280
           if(response.data.state == 1){
278
             var list = response.data.data.list 
281
             var list = response.data.data.list 
279
             console.log("list2332232323232",list)
282
             console.log("list2332232323232",list)
319
        }
322
        }
320
        return count
323
        return count
321
      },
324
      },
322
-     toClick(id){
323
-       this.$router.push({path:"/purchase/order/edit?id="+id})
325
+     editGoodReturn(id){
326
+       this.$router.push({path:"/good/return/edit?id="+id})
324
      }
327
      }
325
   },
328
   },
326
   created() {
329
   created() {
332
     this.start_time = monthStartDate
335
     this.start_time = monthStartDate
333
     this.org_id =  this.$store.getters.xt_user.org_id
336
     this.org_id =  this.$store.getters.xt_user.org_id
334
     this.getAllSupply()
337
     this.getAllSupply()
335
-    // this.getlist()
338
+    this.getlist()
336
   },
339
   },
337
  
340
  
338
 };
341
 };
389
   background-color: #d0d3da;
392
   background-color: #d0d3da;
390
 }
393
 }
391
 
394
 
395
+.el-table__fixed-right {
396
+  width: 150px;
397
+  bottom: 20px;
398
+  height: 100%;
399
+}
400
+
392
 </style>
401
 </style>