Bläddra i källkod

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

柳香萍 6 år sedan
förälder
incheckning
cdad33ccae
40 ändrade filer med 1480 tillägg och 5067 borttagningar
  1. 14 0
      src/api/qcd.js
  2. 522 502
      src/router/index.js
  3. 1 1
      src/xt_pages/dialysis/PatientBox.vue
  4. 1 1
      src/xt_pages/qcd/components/BarChart.vue
  5. 1 1
      src/xt_pages/qcd/components/PieChart.vue
  6. 146 42
      src/xt_pages/qcd/patientAnalysis/bloodPressure.vue
  7. 1 1
      src/xt_pages/qcd/patientAnalysis/dialysisAge.vue
  8. 169 24
      src/xt_pages/qcd/patientAnalysis/weight.vue
  9. 0 454
      src/xt_pages/stock/addStockIn.vue
  10. 0 423
      src/xt_pages/stock/addStockOut.vue
  11. 0 300
      src/xt_pages/stock/cancelStock.vue
  12. 18 24
      src/xt_pages/stock/cancelStockOrder.vue
  13. 59 64
      src/xt_pages/stock/cancelStockOrderAdd.vue
  14. 1 8
      src/xt_pages/stock/cancelStockOrderDetail.vue
  15. 87 95
      src/xt_pages/stock/cancelStockOrderEdit.vue
  16. 0 388
      src/xt_pages/stock/cancelStockRecord.vue
  17. 20 25
      src/xt_pages/stock/otherCancelStockOrder.vue
  18. 9 10
      src/xt_pages/stock/otherSalesReturnOrder.vue
  19. 5 12
      src/xt_pages/stock/otherStockInOrder.vue
  20. 49 49
      src/xt_pages/stock/otherStockOutOrder.vue
  21. 0 315
      src/xt_pages/stock/salesReturn.vue
  22. 33 50
      src/xt_pages/stock/salesReturnEdit.vue
  23. 7 13
      src/xt_pages/stock/salesReturnOrder.vue
  24. 118 128
      src/xt_pages/stock/salesReturnOrderAdd.vue
  25. 1 8
      src/xt_pages/stock/salesReturnOrderDetail.vue
  26. 0 401
      src/xt_pages/stock/salesReutrnRecord.vue
  27. 0 436
      src/xt_pages/stock/stockIn.vue
  28. 2 2
      src/xt_pages/stock/stockInOrder.vue
  29. 62 79
      src/xt_pages/stock/stockInOrderAdd.vue
  30. 2 8
      src/xt_pages/stock/stockInOrderDetail.vue
  31. 36 51
      src/xt_pages/stock/stockInOrderEdit.vue
  32. 0 420
      src/xt_pages/stock/stockOut.vue
  33. 6 0
      src/xt_pages/stock/stockOutOrder.vue
  34. 57 75
      src/xt_pages/stock/stockOutOrderAdd.vue
  35. 1 9
      src/xt_pages/stock/stockOutOrderDetail.vue
  36. 31 53
      src/xt_pages/stock/stockOutOrderEdit.vue
  37. 0 270
      src/xt_pages/stock/stockOutRecord.vue
  38. 8 8
      src/xt_pages/stock/stockQuery.vue
  39. 0 304
      src/xt_pages/stock/warehouseRecord.vue
  40. 13 13
      src/xt_permission.js

+ 14 - 0
src/api/qcd.js Visa fil

41
     method: 'get',
41
     method: 'get',
42
     params: params
42
     params: params
43
   })
43
   })
44
+}
45
+export function GetPAWeightData(params) {
46
+  return request({
47
+    url: '/api/qcd/paweightdata',
48
+    method: 'get',
49
+    params: params
50
+  })
51
+}
52
+export function GetPABloodPressureData(params) {
53
+  return request({
54
+    url: '/api/qcd/pabloodpressuredata',
55
+    method: 'get',
56
+    params: params
57
+  })
44
 }
58
 }

Filskillnaden har hållits tillbaka eftersom den är för stor
+ 522 - 502
src/router/index.js


+ 1 - 1
src/xt_pages/dialysis/PatientBox.vue Visa fil

1
 <template>
1
 <template>
2
 <div>
2
 <div>
3
   <!-- <router-link to="/dialysis/details"> -->
3
   <!-- <router-link to="/dialysis/details"> -->
4
-    <div class="patient" v-for="schedule in schedules" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
4
+    <div class="patient" v-for="schedule in schedules" v-if="schedule.patient" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
5
         <div class="kehu" >
5
         <div class="kehu" >
6
           <div class="tx">
6
           <div class="tx">
7
             <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">
7
             <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">

+ 1 - 1
src/xt_pages/qcd/components/BarChart.vue Visa fil

21
     },
21
     },
22
     height: {
22
     height: {
23
       type: String,
23
       type: String,
24
-      default: '300px'
24
+      default: '350px'
25
     },
25
     },
26
     title:{
26
     title:{
27
       type: String,
27
       type: String,

+ 1 - 1
src/xt_pages/qcd/components/PieChart.vue Visa fil

19
     },
19
     },
20
     height: {
20
     height: {
21
       type: String,
21
       type: String,
22
-      default: '320px'
22
+      default: '350px'
23
     },
23
     },
24
     title:{
24
     title:{
25
       type: String,
25
       type: String,

+ 146 - 42
src/xt_pages/qcd/patientAnalysis/bloodPressure.vue Visa fil

36
           value-format="yyyy-MM-dd"
36
           value-format="yyyy-MM-dd"
37
         ></el-date-picker>
37
         ></el-date-picker>
38
       </div>
38
       </div>
39
+      
39
       <div class="cell clearfix">
40
       <div class="cell clearfix">
40
         <label class="title">
41
         <label class="title">
41
-          <span class="name">转归状态</span> :
42
+          <span class="name">透析阶段</span> :
42
         </label>
43
         </label>
43
         <div class="time">
44
         <div class="time">
44
           <ul class>
45
           <ul class>
45
             <li
46
             <li
46
-              :class="item.lapseto==lapsetoType?'active':''"
47
-              @click="selectLapseTo( item.lapseto)"
48
-              v-for="item in lapsetoState"
47
+              :class="item.value==dialysisStageType?'active':''"
48
+              @click="selectDialysisStage( item.value)"
49
+              v-for="item in dialysisStage"
49
               :key="item.value"
50
               :key="item.value"
50
             >{{item.label}}</li>
51
             >{{item.label}}</li>
51
           </ul>
52
           </ul>
53
       </div>
54
       </div>
54
       <div class="cell clearfix">
55
       <div class="cell clearfix">
55
         <label class="title">
56
         <label class="title">
56
-          <span class="name">年龄</span> :
57
+          <span class="name">转归状态</span> :
57
         </label>
58
         </label>
58
         <div class="time">
59
         <div class="time">
59
           <ul class>
60
           <ul class>
60
             <li
61
             <li
61
-              :class="item.age==ageType?'active':''"
62
-              @click="selectAge( item.age)"
63
-              v-for="item in ageOptions"
62
+              :class="item.lapseto==lapsetoType?'active':''"
63
+              @click="selectLapseTo( item.lapseto)"
64
+              v-for="item in lapsetoState"
64
               :key="item.value"
65
               :key="item.value"
65
             >{{item.label}}</li>
66
             >{{item.label}}</li>
66
           </ul>
67
           </ul>
73
       <el-row :gutter="32">
74
       <el-row :gutter="32">
74
         <el-col :xs="24" :sm="24" :lg="24">
75
         <el-col :xs="24" :sm="24" :lg="24">
75
           <div class="chart-wrapper">
76
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
77
+              <pie-chart title="血压(从次)" :options="CompletionOptions"/>
77
           </div>
78
           </div>
78
         </el-col>
79
         </el-col>
79
       </el-row>
80
       </el-row>
90
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91
       >
92
       >
92
         
93
         
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
94
+        
95
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
96
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
94
         </el-table-column>
97
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
98
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
99
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
96
         </el-table-column>
100
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
101
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
102
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
99
         </el-table-column>
103
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
104
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
105
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
106
+        </el-table-column>
107
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
108
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
109
+        </el-table-column>
110
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
111
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
112
+        </el-table-column>
113
+        <el-table-column  label="透前血压//mmHg" min-width="80" property="assessment_before_dislysis" align="center" :render-header="renderheader">
114
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis&&scope.row.assessment_before_dislysis.systolic_blood_pressure&&scope.row.assessment_before_dislysis.diastolic_blood_pressure? scope.row.assessment_before_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_before_dislysis.diastolic_blood_pressure:'--'}}</span></template>
115
+        </el-table-column>
116
+        <el-table-column  label="透析中最低血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
117
+          <template slot-scope="scope"><span>{{minBloodPressure(scope.row.monitor_records)}}</span></template>
118
+        </el-table-column>
119
+        <el-table-column  label="透析中最高血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
120
+          <template slot-scope="scope"><span>{{maxBloodPressure(scope.row.monitor_records)}}</span></template>
121
+        </el-table-column>
122
+        <el-table-column  label="透后血压//mmHg" min-width="80" property="assessment_after_dislysis" align="center" :render-header="renderheader">
123
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis&&scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure? scope.row.assessment_after_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_after_dislysis.diastolic_blood_pressure:'--'}}</span></template>
102
         </el-table-column>
124
         </el-table-column>
103
-        
104
       </el-table>
125
       </el-table>
105
 
126
 
106
       <!-- <pagi-nation title="分页"></pagi-nation> -->
127
       <!-- <pagi-nation title="分页"></pagi-nation> -->
123
 
144
 
124
 
145
 
125
 <script>
146
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
147
+import { GetPABloodPressureData  } from "@/api/qcd";
127
 import PieChart from '../components/PieChart'
148
 import PieChart from '../components/PieChart'
128
 import {jsGetAge, uParseTime} from "@/utils/tools";
149
 import {jsGetAge, uParseTime} from "@/utils/tools";
129
 import analysisNav from './components/analysisNav'
150
 import analysisNav from './components/analysisNav'
156
         { value: 1, label: "转出", source: 0, lapseto: 2 },
177
         { value: 1, label: "转出", source: 0, lapseto: 2 },
157
         { value: 2, label: "留治", source: 0, lapseto: 1 }
178
         { value: 2, label: "留治", source: 0, lapseto: 1 }
158
       ],
179
       ],
159
-      ageType: 0,
160
-      ageOptions: [
161
-        { value: 0, label: "全部", age: 0 },
162
-        { value: 1, label: "20~30", age: 1 },
163
-        { value: 2, label: "30~40", age: 2 },
164
-        { value: 3, label: "40~50", age: 3 },
165
-        { value: 4, label: "其他", age: 4 },
180
+      dialysisStageType:0,
181
+      dialysisStage: [
182
+        { value: 0, label: "全部", },
183
+        { value: 1, label: "透前",  },
184
+        { value: 2, label: "透后", }
166
       ],
185
       ],
167
     };
186
     };
168
   },
187
   },
192
   },
211
   },
193
   methods: {
212
   methods: {
194
     getList() {
213
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
214
+      GetPABloodPressureData(this.listQuery).then(response => {
196
         if (response.data.state == 0) {
215
         if (response.data.state == 0) {
197
           this.$message.error(response.data.msg);
216
           this.$message.error(response.data.msg);
198
           return false;
217
           return false;
199
         } else {
218
         } else {
200
             this.tableData = [];
219
             this.tableData = [];
201
             this.total = response.data.data.total;
220
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
221
+            var blood_pressures = response.data.data.blood_pressures;
222
+            for (const index in blood_pressures) {
223
+                this.tableData.push(blood_pressures[index]);
205
             }
224
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
208
             this.CompletionOptions = {
225
             this.CompletionOptions = {
209
                 legend:[],
226
                 legend:[],
210
                 series:[],
227
                 series:[],
211
             };
228
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
229
+            
230
+            var bpOptions = [
231
+              { blood:1, name:'< 140 /90mmHg' },
232
+              { blood:2, name:'>160 /100mmHg' },
233
+              { blood:3, name:'140~160mmHg/90~100mmHg' },
234
+            ];
235
+            var other = response.data.data.total;
236
+            var bps = response.data.data.bps;
237
+            var bpsMap = {};
238
+            for (const index in bps) {
239
+              bpsMap[bps[index].blood] = bps[index].count;
240
+              other -= bps[index].count;
241
+            }
242
+            for (const index in bpOptions) {
243
+              this.CompletionOptions.legend.push(bpOptions[index].name);
244
+              if(bpOptions[index].blood in bpsMap) {
245
+                this.CompletionOptions.series.push({
246
+                    value:bpsMap[bpOptions[index].blood],name:bpOptions[index].name
247
+                });
248
+              }else {
249
+                this.CompletionOptions.series.push({
250
+                    value:0,name:bpOptions[index].name
251
+                });
252
+              }
253
+            }
254
+            if (other > 0) {
255
+              this.CompletionOptions.legend.push('其他');
256
+              this.CompletionOptions.series.push({
257
+                  value:other,name:'其他'
258
+              });
259
+            }
220
         }
260
         }
221
       });
261
       });
222
     },
262
     },
239
       this.listQuery.lapseto = lapseto;
279
       this.listQuery.lapseto = lapseto;
240
       this.getList();
280
       this.getList();
241
     },
281
     },
242
-    selectAge(age) {
243
-      this.ageType = age;
244
-      this.listQuery.age = age;
282
+    selectDialysisStage(dialysis_stage) {
283
+      this.dialysisStageType = dialysis_stage;
284
+      this.listQuery.dialysis_stage = dialysis_stage;
245
       this.getList();
285
       this.getList();
246
     },
286
     },
247
-    
248
     getTime(value, temp) {
287
     getTime(value, temp) {
249
         if (value != undefined) {
288
         if (value != undefined) {
250
           return uParseTime(value, temp)
289
           return uParseTime(value, temp)
257
     getPatientName(id) {
296
     getPatientName(id) {
258
       return (id in this.patientMap) ? this.patientMap[id].name:'';
297
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259
     },
298
     },
299
+    tranLapseto(lapseto) {
300
+      if (lapseto == 1) {
301
+        return '留治';
302
+      } else if(lapseto == 2) {
303
+        return '转出';
304
+      }
305
+      return '';
306
+    },
260
     getPatientGender(gender) {
307
     getPatientGender(gender) {
261
       if (gender == 1) {
308
       if (gender == 1) {
262
         return '男';
309
         return '男';
283
             h('span', {}, column.label.split('//')[1])
330
             h('span', {}, column.label.split('//')[1])
284
         ])
331
         ])
285
     },
332
     },
333
+    maxBloodPressure(records){
334
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
335
+        return '--';
336
+      }
337
+      var arr = [];
338
+      for (const key in records) {
339
+        arr.push(records[key]);
340
+      }
341
+      if(arr.length == 0) {
342
+        return '--';
343
+      }
344
+
345
+      var sortData = this.selectionSort(arr);
346
+      arr = [];
347
+      for (const key in sortData) {
348
+        arr.push(sortData[key]);
349
+      }
350
+      var index = arr.length - 1;
351
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
352
+    },
353
+    minBloodPressure(records){
354
+      
355
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
356
+        return '--';
357
+      }
358
+      var arr = [];
359
+      for (const key in records) {
360
+        arr.push(records[key]);
361
+      }
362
+      if(arr.length == 0) {
363
+        return '--';
364
+      }
365
+
366
+      var sortData = this.selectionSort(arr);
367
+      arr = [];
368
+      for (const key in sortData) {
369
+        arr.push(sortData[key]);
370
+      }
371
+      var index = 0;
372
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
373
+    },
374
+    selectionSort(arr) {
375
+      var len = arr.length;
376
+      var minIndex, temp;
377
+      for (var i = 0; i < len - 1; i++) {
378
+          minIndex = i;
379
+          for (var j = i + 1; j < len; j++) {
380
+              if (arr[j].systolic_blood_pressure < arr[minIndex].systolic_blood_pressure || (arr[j].systolic_blood_pressure == arr[minIndex].systolic_blood_pressure && arr[j].diastolic_blood_pressure < arr[minIndex].diastolic_blood_pressure)) {     //寻找最小的数
381
+                  minIndex = j;                 //将最小数的索引保存
382
+              }
383
+          }
384
+          temp = arr[i];
385
+          arr[i] = arr[minIndex];
386
+          arr[minIndex] = temp;
387
+      }
388
+      return arr;
389
+    },
286
   },
390
   },
287
   components: {
391
   components: {
288
       analysisNav,
392
       analysisNav,

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/dialysisAge.vue Visa fil

115
         <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
115
         <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
116
           <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
116
           <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
117
         </el-table-column>
117
         </el-table-column>
118
-        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
118
+        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
119
           <template slot-scope="scope"><span>{{tranLapseto(scope.row.lapseto)}}</span></template>
119
           <template slot-scope="scope"><span>{{tranLapseto(scope.row.lapseto)}}</span></template>
120
         </el-table-column>
120
         </el-table-column>
121
         <el-table-column  label="首次透析日期" min-width="80" property="first_dialysis_date" align="center">
121
         <el-table-column  label="首次透析日期" min-width="80" property="first_dialysis_date" align="center">

+ 169 - 24
src/xt_pages/qcd/patientAnalysis/weight.vue Visa fil

71
       <h4 class="hui">统计图</h4>
71
       <h4 class="hui">统计图</h4>
72
       <hr class="huixiao">
72
       <hr class="huixiao">
73
       <el-row :gutter="32">
73
       <el-row :gutter="32">
74
-        <el-col :xs="24" :sm="24" :lg="24">
74
+        <el-col :xs="24" :sm="24" :lg="8">
75
           <div class="chart-wrapper">
75
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
76
+              <pie-chart title="干体重(人次)" :options="CompletionOptions"/>
77
+          </div>
78
+        </el-col>
79
+        <el-col :xs="24" :sm="24" :lg="8">
80
+          <div class="chart-wrapper">
81
+              <pie-chart title="体重增加(人次)" :options="WeightIncrOptions"/>
82
+          </div>
83
+        </el-col>
84
+        <el-col :xs="24" :sm="24" :lg="8">
85
+          <div class="chart-wrapper">
86
+              <pie-chart title="透后体重(人次)" :options="WeightAfterOptions"/>
77
           </div>
87
           </div>
78
         </el-col>
88
         </el-col>
79
       </el-row>
89
       </el-row>
89
         style="width: 100%;margin-top: 10px;"
99
         style="width: 100%;margin-top: 10px;"
90
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
100
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91
       >
101
       >
92
-        
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
102
+      
103
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
104
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
105
+        </el-table-column>
106
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
107
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
108
+        </el-table-column>
109
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
110
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
111
+        </el-table-column>
112
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
113
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
114
+        </el-table-column>
115
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
116
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
94
         </el-table-column>
117
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
118
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
119
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
96
         </el-table-column>
120
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
121
+        <el-table-column  label="干体重" min-width="80" property="assessment_before_dislysis" align="center">
122
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
99
         </el-table-column>
123
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
124
+        <el-table-column  label="透前体重" min-width="80" property="assessment_before_dislysis" align="center">
125
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before + 'Kg':'--'}}</span></template>
126
+        </el-table-column>
127
+        <el-table-column  label="体重增加" min-width="80" property="assessment_before_dislysis" align="center">
128
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before - scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
129
+        </el-table-column>
130
+        <el-table-column  label="透后体重" min-width="80" property="assessment_after_dislysis" align="center">
131
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis?scope.row.assessment_after_dislysis.weight_after+ 'Kg':'--'}}</span></template>
102
         </el-table-column>
132
         </el-table-column>
103
         
133
         
104
       </el-table>
134
       </el-table>
123
 
153
 
124
 
154
 
125
 <script>
155
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
156
+import { GetPAWeightData  } from "@/api/qcd";
127
 import PieChart from '../components/PieChart'
157
 import PieChart from '../components/PieChart'
128
 import {jsGetAge, uParseTime} from "@/utils/tools";
158
 import {jsGetAge, uParseTime} from "@/utils/tools";
129
 import analysisNav from './components/analysisNav'
159
 import analysisNav from './components/analysisNav'
149
         legend:[],
179
         legend:[],
150
         series:[],
180
         series:[],
151
       },
181
       },
182
+      WeightIncrOptions:{
183
+        legend:[],
184
+        series:[],
185
+      },
186
+      WeightAfterOptions:{
187
+        legend:[],
188
+        series:[],
189
+      },
152
       tableData: [],
190
       tableData: [],
153
       lapsetoType: 0,
191
       lapsetoType: 0,
154
       lapsetoState: [
192
       lapsetoState: [
192
   },
230
   },
193
   methods: {
231
   methods: {
194
     getList() {
232
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
233
+      GetPAWeightData(this.listQuery).then(response => {
196
         if (response.data.state == 0) {
234
         if (response.data.state == 0) {
197
           this.$message.error(response.data.msg);
235
           this.$message.error(response.data.msg);
198
           return false;
236
           return false;
199
         } else {
237
         } else {
200
             this.tableData = [];
238
             this.tableData = [];
201
             this.total = response.data.data.total;
239
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
240
+            var weights = response.data.data.weights;
241
+            for (const index in weights) {
242
+                this.tableData.push(weights[index]);
205
             }
243
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
244
+
208
             this.CompletionOptions = {
245
             this.CompletionOptions = {
209
                 legend:[],
246
                 legend:[],
210
                 series:[],
247
                 series:[],
211
             };
248
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
249
+            var dryweightOptions = [
250
+              { weight:1, name:'<40Kg' },
251
+              { weight:2, name:'40~50Kg' },
252
+              { weight:3, name:'50~60Kg' },
253
+              { weight:4, name:'60~70Kg' },
254
+              { weight:5, name:'>=70Kg' },
255
+            ];
256
+            var other = response.data.data.total;
257
+            var dryweight = response.data.data.dryweight;
258
+            var dryweightMap = {};
259
+            for (const index in dryweight) {
260
+              dryweightMap[dryweight[index].weight] = dryweight[index].count;
261
+              other -= dryweight[index].count;
262
+            }
263
+            for (const index in dryweightOptions) {
264
+              this.CompletionOptions.legend.push(dryweightOptions[index].name);
265
+              if(dryweightOptions[index].weight in dryweightMap) {
266
+                this.CompletionOptions.series.push({
267
+                    value:dryweightMap[dryweightOptions[index].weight],name:dryweightOptions[index].name
268
+                });
269
+              }else {
270
+                this.CompletionOptions.series.push({
271
+                    value:0,name:dryweightOptions[index].name
272
+                });
273
+              }
274
+            }
275
+            if (other > 0) {
276
+              this.CompletionOptions.legend.push('其他');
277
+              this.CompletionOptions.series.push({
278
+                  value:other,name:'其他'
279
+              });
280
+            }
281
+
282
+            this.WeightIncrOptions = {
283
+                legend:[],
284
+                series:[],
285
+            };
286
+            var weightOptions = [
287
+              { weight:1, name:'<1Kg' },
288
+              { weight:2, name:'1~2Kg' },
289
+              { weight:3, name:'2~3Kg' },
290
+              { weight:4, name:'3~4Kg' },
291
+              { weight:5, name:'>=4Kg' },
292
+            ];
293
+            var other = response.data.data.total;
294
+            var weightincrease = response.data.data.weightincrease;
295
+            var weightincreaseMap = {};
296
+            for (const index in weightincrease) {
297
+              weightincreaseMap[weightincrease[index].weight] = weightincrease[index].count;
298
+              other -= weightincrease[index].count;
299
+            }
300
+            for (const index in weightOptions) {
301
+              this.WeightIncrOptions.legend.push(weightOptions[index].name);
302
+              if(weightOptions[index].weight in weightincreaseMap) {
303
+                this.WeightIncrOptions.series.push({
304
+                    value:weightincreaseMap[weightOptions[index].weight],name:weightOptions[index].name
305
+                });
306
+              }else {
307
+                this.WeightIncrOptions.series.push({
308
+                    value:0,name:weightOptions[index].name
309
+                });
310
+              }
311
+            }
312
+            if (other > 0) {
313
+              this.WeightIncrOptions.legend.push('其他');
314
+              this.WeightIncrOptions.series.push({
315
+                  value:other,name:'其他'
316
+              });
317
+            }
318
+
319
+            this.WeightAfterOptions = {
320
+                legend:[],
321
+                series:[],
322
+            };
323
+            var afterWeightOptions = [
324
+              { weight:1, name:'<40Kg' },
325
+              { weight:2, name:'40~50Kg' },
326
+              { weight:3, name:'50~60Kg' },
327
+              { weight:4, name:'60~70Kg' },
328
+              { weight:5, name:'>=70Kg' },
329
+            ];
330
+            var other = response.data.data.total;
331
+            var afterweight = response.data.data.afterweight;
332
+            var afterweightMap = {};
333
+            for (const index in afterweight) {
334
+              afterweightMap[afterweight[index].weight] = afterweight[index].count;
335
+              other -= afterweight[index].count;
336
+            }
337
+            for (const index in weightOptions) {
338
+              this.WeightAfterOptions.legend.push(weightOptions[index].name);
339
+              if(weightOptions[index].weight in afterweightMap) {
340
+                this.WeightAfterOptions.series.push({
341
+                    value:afterweightMap[weightOptions[index].weight],name:weightOptions[index].name
342
+                });
343
+              }else {
344
+                this.WeightAfterOptions.series.push({
345
+                    value:0,name:weightOptions[index].name
346
+                });
347
+              }
348
+            }
349
+            if (other > 0) {
350
+              this.WeightAfterOptions.legend.push('其他');
351
+              this.WeightAfterOptions.series.push({
352
+                  value:other,name:'其他'
353
+              });
354
+            }
355
+
356
+            
220
         }
357
         }
221
       });
358
       });
222
     },
359
     },
257
     getPatientName(id) {
394
     getPatientName(id) {
258
       return (id in this.patientMap) ? this.patientMap[id].name:'';
395
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259
     },
396
     },
397
+    tranLapseto(lapseto) {
398
+      if (lapseto == 1) {
399
+        return '留治';
400
+      } else if(lapseto == 2) {
401
+        return '转出';
402
+      }
403
+      return '';
404
+    },
260
     getPatientGender(gender) {
405
     getPatientGender(gender) {
261
       if (gender == 1) {
406
       if (gender == 1) {
262
         return '男';
407
         return '男';

+ 0 - 454
src/xt_pages/stock/addStockIn.vue Visa fil

1
-<template>
2
-<div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb></bread-crumb>
5
-      <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleCancle" >返回</el-button>
7
-        <el-button size="small" icon="el-icon-circle-plus-outline"    @click="handleCreate" type="primary">添加</el-button>
8
-      </el-row>
9
-    </div>
10
-  <div class="app-container sign-and-weigh-box">
11
-    <stock-in-dialog :propForm="propForm"
12
-                     :visibility="isVisibility"
13
-                     v-on:dialog-comfirm="comfirm"
14
-                     v-on:dialog-cancle="cancle"></stock-in-dialog>
15
-
16
-    <div class="">
17
-      <div class="cell" style="float:left;">
18
-        <label class="title"><span class="name">入库时间:</span></label>
19
-        <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd"></el-date-picker>
22
-      </div>
23
-    </div>
24
-    <el-row>
25
-      <el-col>
26
-        <div class="titleTop">入库列表 </div>
27
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
28
-        >
29
-          <el-table-column label="物品类型" min-width="30" align="center">
30
-            <template slot-scope="scope">
31
-              {{typeName(scope.row.good_type_id)}}
32
-            </template>
33
-          </el-table-column>
34
-          <el-table-column label="规格名称" min-width="30" align="center">
35
-            <template slot-scope="scope">
36
-              {{specificationName(scope.row.good_id)}}
37
-            </template>
38
-          </el-table-column>
39
-          <el-table-column label="批号" align="center" min-width="30">
40
-            <template slot-scope="scope">
41
-              {{scope.row.number}}
42
-
43
-            </template>
44
-          </el-table-column>
45
-          <el-table-column label="生产日期" min-width="30" align="center">
46
-            <template slot-scope="scope" v-if="scope.row.product_date != 0">
47
-              {{scope.row.product_date | parseTime("{y}-{m}-{d}")}}
48
-            </template>
49
-          </el-table-column>
50
-          <el-table-column label="有效日期" min-width="30" align="center">
51
-            <template slot-scope="scope">
52
-              {{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}
53
-
54
-            </template>
55
-          </el-table-column>
56
-
57
-          <el-table-column label="入库数量" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              {{scope.row.warehousing_count}}
60
-
61
-            </template>
62
-          </el-table-column>
63
-          <el-table-column label="入库单价" min-width="30" align="center">
64
-            <template slot-scope="scope">
65
-              {{scope.row.price}}
66
-            </template>
67
-          </el-table-column>
68
-          <el-table-column label="物品总价" min-width="30" align="center">
69
-            <template slot-scope="scope">
70
-              {{calculate(scope.row.price*scope.row.warehousing_count)}}
71
-            </template>
72
-          </el-table-column>
73
-          <el-table-column label="操作" align="center" min-width="70">
74
-            <template slot-scope="scope">
75
-              <el-tooltip class="item" effect="dark" content="添加" placement="top">
76
-                <el-button
77
-                  size="small"
78
-                  icon="el-icon-circle-plus-outline"
79
-                  @click="handleEdit(scope.$index, scope.row)">
80
-                </el-button>
81
-              </el-tooltip>
82
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">
83
-                <el-button
84
-                  size="small"
85
-                  icon="el-icon-delete"
86
-                  type="danger"
87
-                  @click="handleDelete(scope.$index, scope.row)">
88
-                </el-button>
89
-              </el-tooltip>
90
-              <el-tooltip class="item" effect="dark" content="查看详情" placement="top">
91
-                <el-button
92
-                  size="small"
93
-                  icon="el-icon-document"
94
-                  type="primary"
95
-                  @click="showDetails(scope.$index, scope.row)">
96
-                </el-button>
97
-              </el-tooltip>
98
-            </template>
99
-          </el-table-column>
100
-        </el-table>
101
-      </el-col>
102
-
103
-
104
-    </el-row>
105
-    </div>
106
-  </div>
107
-</template>
108
-
109
-<script>
110
-  import stockInDialog from './Dialog/stockInDialog'
111
-  import {uParseTime} from "@/utils/tools";
112
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
113
-
114
-  import {
115
-    GetAllGoodInfo,
116
-    GetAllGoodType,
117
-    postWarehouse,
118
-    getWarehouseInfoByOrdeNumber,
119
-    modifyWarehouseInfo,
120
-    deleteWarehouseInfo
121
-  } from "@/api/stock";
122
-
123
-  export default {
124
-    components: {stockInDialog,BreadCrumb},
125
-    name: "stockIn",
126
-
127
-    data() {
128
-      return {
129
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
130
-        warehousing_time: '',
131
-        adminUserOptions: null,
132
-
133
-        recordInfo: {
134
-          recordData: [],
135
-          stock_in_code: '',
136
-          current_index: '',
137
-          warehousing_order: '',
138
-
139
-        },
140
-        total: '',
141
-
142
-        //prop
143
-        isVisibility: false,
144
-        propForm: {
145
-          goodType: [],
146
-          goodInfo: [],
147
-          title: '入库',
148
-          formValue: {
149
-            good_type_id: '',
150
-            good_id: '',
151
-            number: '',
152
-            product_date: '',
153
-            expiry_date: '',
154
-            warehousing_count: '',
155
-            price: '',
156
-            remark: '',
157
-            dealer: '',
158
-            manufacturer: ''
159
-
160
-          },
161
-          isCreated: 1,
162
-
163
-        },
164
-
165
-        goodInfo: {
166
-          loading: false,
167
-          goodTypeData: [],
168
-          type_code: '',
169
-        }
170
-
171
-
172
-      };
173
-    },
174
-    methods: {
175
-      handleSave: function () {
176
-        if (this.recordInfo.recordData.length <= 0) {
177
-          this.$message.error('请添加入库信息');
178
-          return
179
-        }
180
-        sessionStorage.removeItem("warehousing_orders")
181
-        this.$router.back(-1)
182
-
183
-      }, handleCancle: function () {
184
-        this.$confirm('是否放弃编辑返回上一页?', '放弃编辑', {
185
-          confirmButtonText: '确定',
186
-          cancelButtonText: '取消',
187
-          type: 'warning'
188
-        }).then(() => {
189
-          sessionStorage.removeItem("warehousing_orders")
190
-          this.$router.back(-1)
191
-        }).catch(() => {
192
-
193
-        });
194
-
195
-      }, handleCreate: function () {
196
-        this.propForm.formValue = {}
197
-        this.propForm.isCreated = 1
198
-        this.isVisibility = true
199
-
200
-
201
-      }, comfirm: function (val) {
202
-        this.isVisibility = false
203
-        if (val.isCreated == 2) { //修改
204
-          val['warehousing_order'] = sessionStorage.getItem("warehousing_orders")
205
-          modifyWarehouseInfo(val).then(response => {
206
-            if (response.data.state == 0) {
207
-              this.$message.error(response.data.msg);
208
-              return false;
209
-            } else {
210
-              this.recordInfo.recordData[this.recordInfo.current_index].good_type_id = response.data.data.info.good_type_id
211
-              this.recordInfo.recordData[this.recordInfo.current_index].good_id = response.data.data.info.good_id
212
-              this.recordInfo.recordData[this.recordInfo.current_index].number = response.data.data.info.number
213
-              this.recordInfo.recordData[this.recordInfo.current_index].product_date = response.data.data.info.product_date
214
-              this.recordInfo.recordData[this.recordInfo.current_index].expiry_date = response.data.data.info.expiry_date
215
-              this.recordInfo.recordData[this.recordInfo.current_index].warehousing_count = response.data.data.info.warehousing_count
216
-              this.recordInfo.recordData[this.recordInfo.current_index].price = response.data.data.info.price
217
-              this.recordInfo.recordData[this.recordInfo.current_index].remark = response.data.data.info.remark
218
-              this.$notify({
219
-                title: "成功",
220
-                message: "修改成功",
221
-                type: "success",
222
-                duration: 2000
223
-              });
224
-            }
225
-          });
226
-
227
-
228
-        } else if (val.isCreated == 1) { //添加
229
-
230
-
231
-          if (sessionStorage.getItem("warehousing_orders") == null) {
232
-
233
-            this.warehousing_order = ''
234
-          } else {
235
-            this.warehousing_order = sessionStorage.getItem("warehousing_orders")
236
-          }
237
-          console.log(this.warehousing_order)
238
-          let tempArr = []
239
-          tempArr.push(val)
240
-          let params = {
241
-            'stockIn': tempArr
242
-          }
243
-          postWarehouse(params, this.warehousing_time, this.warehousing_order).then(response => {
244
-            if (response.data.state == 0) {
245
-              this.$message.error(response.data.msg);
246
-              return false;
247
-            } else {
248
-
249
-              this.$notify({
250
-                title: "成功",
251
-                message: "入库成功",
252
-                type: "success",
253
-                duration: 2000
254
-              });
255
-              this.recordInfo.recordData.push(response.data.data.info)
256
-
257
-
258
-              if (sessionStorage.getItem("warehousing_orders") == null) {
259
-                sessionStorage.setItem("warehousing_orders", response.data.data.warehousing_order)
260
-              }
261
-
262
-
263
-            }
264
-          });
265
-
266
-
267
-        }
268
-      }, cancle: function () {
269
-        this.isVisibility = false
270
-
271
-      }, GetAllGoodType: function () {
272
-        GetAllGoodType().then(response => {
273
-          if (response.data.state == 0) {
274
-            this.$message.error(response.data.msg);
275
-            return false;
276
-          } else {
277
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
278
-              this.propForm.goodType.push(response.data.data.goodType[i])
279
-            }
280
-          }
281
-        });
282
-
283
-
284
-      }, GetAllGoodInfo: function () {
285
-        GetAllGoodInfo().then(response => {
286
-          if (response.data.state == 0) {
287
-            this.$message.error(response.data.msg);
288
-            return false;
289
-          } else {
290
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
291
-              this.propForm.goodInfo.push(response.data.data.goodInfo[i])
292
-
293
-            }
294
-          }
295
-        });
296
-
297
-
298
-      }, typeName: function (good_type_id) {
299
-        let name = ''
300
-        for (let i = 0; i < this.propForm.goodType.length; i++) {
301
-          if (this.propForm.goodType[i].id == good_type_id) {
302
-            name = this.propForm.goodType[i].type_name
303
-          }
304
-        }
305
-        return name
306
-
307
-
308
-      }, specificationName: function (good_info_id) {
309
-        let name = ''
310
-        for (let i = 0; i < this.propForm.goodInfo.length; i++) {
311
-          if (this.propForm.goodInfo[i].id == good_info_id) {
312
-            name = this.propForm.goodInfo[i].specification_name
313
-          }
314
-        }
315
-        return name
316
-      }, handleEdit: function (index, row) {
317
-        this.recordInfo.current_index = index
318
-        for (let key in this.propForm.formValue) {
319
-          this.propForm.formValue[key] = row[key]
320
-
321
-        }
322
-
323
-        this.propForm.formValue.expiry_date = uParseTime(row['expiry_date'], "{y}-{m}-{d}")
324
-        this.propForm.formValue.product_date = uParseTime(row['product_date'], "{y}-{m}-{d}")
325
-
326
-
327
-        this.propForm.isCreated = 2
328
-        this.isVisibility = true
329
-
330
-      }, handleDelete: function (index, row) {
331
-        let params = {
332
-          "id": row.id
333
-
334
-
335
-        }
336
-
337
-        this.$confirm('确认删除这条信息?', '删除物品信息', {
338
-          confirmButtonText: '确定',
339
-          cancelButtonText: '取消',
340
-          type: 'warning'
341
-        }).then(() => {
342
-          deleteWarehouseInfo(params).then(response => {
343
-            if (response.data.state == 0) {
344
-              this.$message.error(response.data.msg);
345
-              return false;
346
-            } else {
347
-              this.$notify({
348
-                title: "成功",
349
-                message: "删除成功",
350
-                type: "success",
351
-                duration: 2000
352
-              });
353
-              this.recordInfo.recordData.splice(index, 1)
354
-            }
355
-          });
356
-
357
-        }).catch(() => {
358
-        });
359
-
360
-      }, showDetails: function (index, row) {
361
-        for (let key in this.propForm.formValue) {
362
-          this.propForm.formValue[key] = row[key]
363
-        }
364
-        this.propForm.formValue.expiry_date = uParseTime(row['expiry_date'], "{y}-{m}-{d}")
365
-        this.propForm.formValue.product_date = uParseTime(row['product_date'], "{y}-{m}-{d}")
366
-
367
-        this.propForm.isCreated = 3
368
-        this.isVisibility = true
369
-
370
-      }, calculate: function (val) {
371
-        return Math.round(parseFloat(val) * 100) / 100
372
-      }, GetWarehouseInfoByOrdeNumber: function () {
373
-        let params = {
374
-          "warehousing_order": sessionStorage.getItem("warehousing_orders")
375
-        }
376
-        this.recordInfo.recordData = []
377
-        getWarehouseInfoByOrdeNumber(params).then(response => {
378
-          if (response.data.state != 0) {
379
-            for (let i = 0; i < response.data.data.info.length; i++) {
380
-              this.recordInfo.recordData.push(response.data.data.info[i])
381
-            }
382
-          }
383
-        });
384
-
385
-      },getTime(val,temp){
386
-        if(val != 0){
387
-          return uParseTime(val, temp);
388
-        }else{
389
-          return "";
390
-        }
391
-
392
-
393
-      }
394
-    },
395
-    created() {
396
-      var year = new Date().getFullYear();
397
-      var month = new Date().getMonth() + 1;
398
-      var day = new Date().getDate();
399
-      if (parseInt(month) < 10) {
400
-        month = "0" + month;
401
-      }
402
-      if (parseInt(day) < 10) {
403
-        day = "0" + day;
404
-      }
405
-      let endTime = year + '-' + month + '-' + day;
406
-      this.warehousing_time = endTime
407
-
408
-      this.GetAllGoodType()
409
-      this.GetAllGoodInfo()
410
-      this.GetWarehouseInfoByOrdeNumber()
411
-
412
-    },
413
-
414
-  };
415
-</script>
416
-
417
-<style rel="stylesheet/css" lang="scss" scoped>
418
-  .information {
419
-    border: 1px #dcdfe6 solid;
420
-    padding: 30px 20px 30px 20px;
421
-
422
-    .border {
423
-      border-bottom: 1px #dcdfe6 solid;
424
-      margin: 0px 0 20px 0;
425
-    }
426
-  }
427
-
428
-  .titleTop {
429
-    background: #409eff;
430
-    height: 44px;
431
-    line-height: 44px;
432
-    padding: 0 0 0 10px;
433
-    color: #fff;
434
-    margin: 0 0 10px 0;
435
-        font-size: 14px;
436
-  }
437
-  .edit_separater {
438
-    border-top: 1px solid rgb(233, 233, 233);
439
-    margin-top: 15px;
440
-    margin-bottom: 15px;
441
-  }
442
-
443
-</style>
444
-
445
-<style>
446
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
447
-    font-size: 12px;
448
-  }
449
-
450
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
451
-    background: #6fb5fa;
452
-  }
453
-
454
-</style>

+ 0 - 423
src/xt_pages/stock/addStockOut.vue Visa fil

1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-     <el-row style="float:right;">
6
-        <!--<el-button @click="handleSave" type="primary">保存</el-button>-->
7
-        <el-button size="small"  icon="el-icon-refresh" @click="handleCancle" >返回</el-button>
8
-        <el-button size="small"  icon="el-icon-circle-plus-outline" @click="handleCreate" type="primary">添加</el-button>
9
-      </el-row>
10
-  </div>
11
-  <div class="app-container sign-and-weigh-box">
12
-    <stock-out-dialog  :propForm="propForm"
13
-                      :visibility="isVisibility"
14
-                      v-on:dialog-comfirm="comfirm"
15
-                      v-on:dialog-cancle="cancle"></stock-out-dialog>
16
-
17
-    <div class="cell">
18
-      <label for="" class="title"> <span class="name">出库时间:</span></label>
19
-      <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                      value-format="yyyy-MM-dd"></el-date-picker>
22
-    </div>
23
-
24
-    <el-row >
25
-      <el-col >
26
-        <div class="titleTop">出库列表
27
-        </div>
28
-        <div style="margin-bottom: 10px;">
29
-        </div>
30
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
31
-        >
32
-          <el-table-column label="物品类型" min-width="30" align="center">
33
-            <template slot-scope="scope">
34
-              {{typeName(scope.row.good_type_id)}}
35
-            </template>
36
-          </el-table-column>
37
-          <el-table-column label="规格名称" min-width="30" align="center">
38
-            <template slot-scope="scope">
39
-              {{specificationName(scope.row.good_id)}}
40
-            </template>
41
-          </el-table-column>
42
-
43
-
44
-          <el-table-column label="出库数量" min-width="30" align="center">
45
-            <template slot-scope="scope">
46
-              {{scope.row.count}}
47
-
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="物品单价" min-width="30" align="center">
52
-            <template slot-scope="scope">
53
-              {{scope.row.price}}
54
-
55
-            </template>
56
-          </el-table-column>
57
-          <el-table-column label="物品总价" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              {{calculate(scope.row.price*scope.row.count)}}
60
-            </template>
61
-          </el-table-column>
62
-          <el-table-column label="操作" align="center" min-width="70">
63
-            <template slot-scope="scope">
64
-              <el-tooltip class="item" effect="dark" content="添加" placement="top">
65
-                <el-button
66
-                  size="small"
67
-                  icon="el-icon-circle-plus-outline"
68
-                  @click="handleEdit(scope.$index, scope.row)">
69
-                </el-button>
70
-              </el-tooltip>
71
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">
72
-                <el-button
73
-                  size="small"
74
-                  icon="el-icon-delete"
75
-                  type="danger"
76
-                  @click="handleDelete(scope.$index, scope.row)">
77
-                </el-button>
78
-              </el-tooltip>
79
-              <el-tooltip class="item" effect="dark" content="查看详情" placement="top">
80
-                <el-button
81
-                  size="small"
82
-                  icon="el-icon-document"
83
-                  type="primary"
84
-                  @click="showDetails(scope.$index, scope.row)">
85
-                </el-button>
86
-              </el-tooltip>
87
-            </template>
88
-          </el-table-column>
89
-        </el-table>
90
-      </el-col>
91
-
92
-    </el-row>
93
-  </div>
94
-   </div>
95
-</template>
96
-
97
-<script>
98
-  import stockOutDialog from './Dialog/stockOutDialog'
99
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
100
-
101
-  import {
102
-    GetAllGoodInfo,
103
-    GetAllGoodType,
104
-    postWarehouseOut,
105
-    getWarehouseOutInfoByOrdeNumber,
106
-    modifyWarehouseOutInfo,
107
-    deleteWarehouseOutInfo
108
-  } from "@/api/stock";
109
-
110
-  export default {
111
-    components: {stockOutDialog,BreadCrumb},
112
-    name: "stockOut",
113
-    data() {
114
-      return {
115
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
116
-        warehousing_time: '',
117
-        adminUserOptions:null,
118
-        warehousing_out_order:'',
119
-        recordInfo: {
120
-          recordData: [],
121
-          stock_in_code: '',
122
-          current_index:'',
123
-
124
-        },
125
-        total:'',
126
-
127
-        //prop
128
-        isVisibility:false,
129
-        propForm:{
130
-          goodType:[],
131
-          goodInfo:[],
132
-          title:'出库',
133
-          formValue:{
134
-            good_type_id:'',
135
-            good_id:'',
136
-            product_date:'',
137
-            expiry_date:'',
138
-            count:'',
139
-            price:'',
140
-            remark:'',
141
-          },
142
-          isCreated:1,
143
-
144
-        },
145
-
146
-        goodInfo: {
147
-          loading: false,
148
-          goodTypeData: [],
149
-          type_code: '',
150
-        }
151
-
152
-
153
-
154
-      };
155
-    },
156
-    methods: {
157
-      handleSave:function () {
158
-
159
-
160
-      },handleCancle:function () {
161
-        this.$confirm('是否放弃编辑返回上一页?', '放弃编辑', {
162
-          confirmButtonText: '确定',
163
-          cancelButtonText: '取消',
164
-          type: 'warning'
165
-        }).then(() => {
166
-          this.recordInfo.recordData = []
167
-          sessionStorage.removeItem("warehousing_out_orders")
168
-
169
-
170
-          this.$router.back(-1)
171
-        }).catch(() => {
172
-
173
-        });
174
-
175
-      },handleCreate:function () {
176
-        this.propForm.formValue = {}
177
-        this.propForm.isCreated = 1
178
-        this.isVisibility = true
179
-
180
-
181
-      },comfirm:function (val) {
182
-        console.log(val)
183
-        this.isVisibility = false
184
-        if (val.isCreated == 2) { //修改
185
-
186
-          val['warehousing_out_orders'] = sessionStorage.getItem("warehousing_out_orders")
187
-          modifyWarehouseOutInfo(val).then(response => {
188
-            if (response.data.state == 0) {
189
-              this.$message.error(response.data.msg);
190
-              return false;
191
-            } else {
192
-              this.recordInfo.recordData[this.recordInfo.current_index].good_type_id = response.data.data.info.good_type_id
193
-              this.recordInfo.recordData[this.recordInfo.current_index].good_id = response.data.data.info.good_id
194
-              this.recordInfo.recordData[this.recordInfo.current_index].count = response.data.data.info.count
195
-              this.recordInfo.recordData[this.recordInfo.current_index].price = response.data.data.info.price
196
-              this.recordInfo.recordData[this.recordInfo.current_index].remark = response.data.data.info.remark
197
-
198
-              this.$notify({
199
-                title: "成功",
200
-                message: "修改成功",
201
-                type: "success",
202
-                duration: 2000
203
-              });
204
-            }
205
-          });
206
-
207
-
208
-
209
-        } else if (val.isCreated == 1) { //添加
210
-
211
-          console.log(sessionStorage.getItem("warehousing_out_orders"))
212
-
213
-          if ( sessionStorage.getItem("warehousing_out_orders") === "undefined" || sessionStorage.getItem("warehousing_out_orders") == null) {
214
-
215
-            this.warehousing_out_order = ''
216
-
217
-          } else {
218
-
219
-            this.warehousing_out_order = sessionStorage.getItem("warehousing_out_orders")
220
-          }
221
-
222
-          let tempArr = []
223
-          tempArr.push(val)
224
-          let params = {
225
-            'stockOut': tempArr
226
-          }
227
-          postWarehouseOut(params, this.warehousing_time, this.warehousing_out_order).then(response => {
228
-            if (response.data.state == 0) {
229
-              this.$message.error(response.data.msg);
230
-              return false;
231
-            } else {
232
-
233
-              this.$notify({
234
-                title: "成功",
235
-                message: "出库成功",
236
-                type: "success",
237
-                duration: 2000
238
-              });
239
-              this.recordInfo.recordData.push(response.data.data.info)
240
-
241
-              if ( sessionStorage.getItem("warehousing_out_orders") === "undefined" || sessionStorage.getItem("warehousing_out_orders") == null) {
242
-                sessionStorage.setItem("warehousing_out_orders", response.data.data.warehousing_out_order)
243
-              }
244
-
245
-
246
-            }
247
-          });
248
-
249
-
250
-          // this.recordInfo.recordData.push(val)
251
-        }
252
-      },cancle:function () {
253
-        this.isVisibility = false
254
-
255
-      },GetAllGoodType:function () {
256
-        GetAllGoodType().then(response => {
257
-          if (response.data.state == 0) {
258
-            this.$message.error(response.data.msg);
259
-            return false;
260
-          } else {
261
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
262
-              this.propForm.goodType.push(response.data.data.goodType[i])
263
-            }
264
-          }
265
-        });
266
-
267
-
268
-      },GetAllGoodInfo:function () {
269
-        GetAllGoodInfo().then(response => {
270
-          if (response.data.state == 0) {
271
-            this.$message.error(response.data.msg);
272
-            return false;
273
-          } else {
274
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
275
-              this.propForm.goodInfo.push(response.data.data.goodInfo[i])
276
-
277
-            }
278
-          }
279
-        });
280
-
281
-
282
-      },typeName:function (good_type_id) {
283
-        let name = ''
284
-        for(let i = 0; i < this.propForm.goodType.length; i++){
285
-          if(this.propForm.goodType[i].id == good_type_id){
286
-            name = this.propForm.goodType[i].type_name
287
-          }
288
-        }
289
-        return name
290
-
291
-
292
-      },specificationName:function (good_info_id) {
293
-        let name = ''
294
-        for(let i = 0; i < this.propForm.goodInfo.length; i++){
295
-          if(this.propForm.goodInfo[i].id == good_info_id){
296
-            name = this.propForm.goodInfo[i].specification_name
297
-          }
298
-        }
299
-        return name
300
-      },handleEdit:function (index, row) {
301
-        this.recordInfo.current_index = index
302
-        for(let key in this.propForm.formValue){
303
-          this.propForm.formValue[key] = row[key]
304
-        }
305
-        this.propForm.isCreated = 2
306
-        this.isVisibility = true
307
-
308
-      },handleDelete:function (index, row) {
309
-        console.log(row)
310
-        let params = {
311
-          "id":row.id
312
-        }
313
-
314
-        this.$confirm('确认删除这条信息?', '删除物品信息', {
315
-          confirmButtonText: '确定',
316
-          cancelButtonText: '取消',
317
-          type: 'warning'
318
-        }).then(() => {
319
-          deleteWarehouseOutInfo(params).then(response => {
320
-            if (response.data.state == 0) {
321
-              this.$message.error(response.data.msg);
322
-              return false;
323
-            } else {
324
-              this.$notify({
325
-                title: "成功",
326
-                message: "删除成功",
327
-                type: "success",
328
-                duration: 2000
329
-              });
330
-              this.recordInfo.recordData.splice(index, 1)
331
-            }
332
-          });
333
-        }).catch(() => {
334
-        });
335
-
336
-      },showDetails:function (index, row) {
337
-        for(let key in this.propForm.formValue){
338
-          this.propForm.formValue[key] = row[key]
339
-        }
340
-        this.propForm.isCreated = 3
341
-        this.isVisibility = true
342
-
343
-      },calculate:function (val) {
344
-        return Math.round(parseFloat(val)*100)/100
345
-      }, GetWarehouseOutInfoByOrdeNumber: function () {
346
-        let params = {
347
-          "warehousing_out_order": sessionStorage.getItem("warehousing_out_orders")
348
-        }
349
-        this.recordInfo.recordData = []
350
-        getWarehouseOutInfoByOrdeNumber(params).then(response => {
351
-          if (response.data.state != 0) {
352
-            for (let i = 0; i < response.data.data.info.length; i++) {
353
-              this.recordInfo.recordData.push(response.data.data.info[i])
354
-            }
355
-          }
356
-        });
357
-
358
-      }
359
-    },
360
-
361
-
362
-    created() {
363
-      var year = new Date().getFullYear();
364
-      var month = new Date().getMonth() + 1;
365
-      var day = new Date().getDate();
366
-      if (parseInt(month) < 10) {
367
-        month = "0" + month;
368
-      }
369
-      if (parseInt(day) < 10) {
370
-        day = "0" + day;
371
-      }
372
-      let endTime = year + '-' + month + '-' + day;
373
-      this.warehousing_time = endTime
374
-      this.GetAllGoodType()
375
-      this.GetAllGoodInfo()
376
-      this.GetWarehouseOutInfoByOrdeNumber()
377
-
378
-    }
379
-  };
380
-</script>
381
-
382
-<style rel="stylesheet/css" lang="scss" scoped>
383
-  .information {
384
-    border: 1px #dcdfe6 solid;
385
-    padding: 30px 20px 30px 20px;
386
-
387
-    .border {
388
-      border-bottom: 1px #dcdfe6 solid;
389
-      margin: 0px 0 20px 0;
390
-    }
391
-  }
392
-
393
-  .titleTop {
394
-    background: #409eff;
395
-    height: 44px;
396
-    line-height: 44px;
397
-    padding: 0 0 0 10px;
398
-    color: #fff;
399
-    margin: 0 0 10px 0;
400
-    // border-radius: 4px 4px 0 0;
401
-        font-size: 14px;
402
-  }
403
-
404
-  .edit_separater {
405
-    border-top: 1px solid rgb(233, 233, 233);
406
-    margin-top: 15px;
407
-    margin-bottom: 15px;
408
-  }
409
-
410
-</style>
411
-
412
-<style>
413
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
414
-    font-size: 12px;
415
-  }
416
-
417
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
418
-    background: #6fb5fa;
419
-  }
420
-
421
-
422
-
423
-</style>

+ 0 - 300
src/xt_pages/stock/cancelStock.vue Visa fil

1
-<template>
2
-
3
-  <div class="app-container sign-and-weigh-box">
4
-
5
-    <div class="filter-container">
6
-      <span>出库退库时间:</span>
7
-      <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
8
-                      type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
9
-                      value-format="yyyy-MM-dd"></el-date-picker>
10
-
11
-      <el-row style="float:right;">
12
-        <el-button @click="handleSave" type="primary">确定</el-button>
13
-      </el-row>
14
-    </div>
15
-
16
-
17
-    <el-row>
18
-      <el-col>
19
-        <div class="title">出库退库列表</div>
20
-        <div style="margin-bottom: 10px;"></div>
21
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="cancelStockTableData" :class="signAndWeighBoxPatients" style="width: 100%" border
22
-                  @row-click="onRowClick"
23
-                  :row-class-name="tableRowClassName"
24
-        >
25
-          <el-table-column label="出库单号" min-width="30" align="center">
26
-            <template slot-scope="scope">
27
-              {{scope.row.warehouse_out_order_number}}
28
-            </template>
29
-          </el-table-column>
30
-
31
-          <el-table-column label="规格名称" align="center" min-width="30">
32
-            <template slot-scope="scope">
33
-              {{getSpecificationName(scope.row.good_id)}}
34
-
35
-            </template>
36
-          </el-table-column>
37
-          <el-table-column label="物品类型" min-width="30" align="center">
38
-            <template slot-scope="scope">
39
-              {{getTypeName(scope.row.good_type_id)}}
40
-
41
-            </template>
42
-          </el-table-column>
43
-          <el-table-column label="出库数量" min-width="30" align="center">
44
-            <template slot-scope="scope">
45
-              {{scope.row.warehouse_out_count}}
46
-
47
-            </template>
48
-          </el-table-column>
49
-
50
-          <el-table-column label="出库单价" min-width="30" align="center">
51
-            <template slot-scope="scope">
52
-              {{scope.row.price}}
53
-
54
-            </template>
55
-          </el-table-column>
56
-
57
-          <el-table-column label="退库数量" min-width="30" align="center">
58
-            <template slot-scope="scope">
59
-              <el-input type="number" v-model="scope.row.return_count" @blur="handleBlur(scope.$index, scope.row)"></el-input>
60
-            </template>
61
-          </el-table-column>
62
-
63
-          <el-table-column label="操作" align="center" min-width="30">
64
-            <template slot-scope="scope">
65
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">
66
-                <el-button
67
-                  size="small"
68
-                  type="danger"
69
-                  icon="el-icon-delete"
70
-                  @click="handleDelete(scope.$index, scope.row)">
71
-                </el-button>
72
-              </el-tooltip>
73
-            </template>
74
-          </el-table-column>
75
-        </el-table>
76
-      </el-col>
77
-
78
-    </el-row>
79
-
80
-  </div>
81
-</template>
82
-
83
-<script>
84
-  import {uParseTime} from "@/utils/tools";
85
-
86
-  import {
87
-    GetAllGoodInfo,
88
-    GetAllGoodType,
89
-    postCancelStock,
90
-    getWarehouseOutInfo
91
-
92
-  } from "@/api/stock";
93
-
94
-  export default {
95
-    name: "cancelStock",
96
-    data() {
97
-      return {
98
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
99
-        return_time: '',
100
-        adminUserOptions: null,
101
-        cancelStockTableData: [],
102
-        total: '',
103
-        isVisibility: false,
104
-        goodInfo: [],
105
-        goodType: [],
106
-        isClick: false,
107
-        orderNumber:'',
108
-      };
109
-    },
110
-    methods: {
111
-      GetWarehouse:function () {
112
-        let params ={
113
-          ids:this.$route.query.id
114
-        }
115
-        getWarehouseOutInfo(params).then(response =>{
116
-          if(response.data.state == 0){
117
-            this.$message.error(response.data.msg)
118
-            return false
119
-          }else{
120
-            this.cancelStockTableData = []
121
-            for (let i = 0; i < response.data.data.info.length; i++) {
122
-              let salesReturnInfo = {}
123
-              this.orderNumber = response.data.data.info[i].WarehouseOut.warehouse_out_order_number
124
-              salesReturnInfo['id'] = response.data.data.info[i].id
125
-              salesReturnInfo['warehouse_out_order_number'] = response.data.data.info[i].WarehouseOut.warehouse_out_order_number
126
-              salesReturnInfo['good_id'] = response.data.data.info[i].good_id
127
-              salesReturnInfo['good_type_id'] = response.data.data.info[i].good_type_id
128
-              salesReturnInfo['warehouse_out_count'] = response.data.data.info[i].count
129
-              salesReturnInfo['price'] = response.data.data.info[i].price
130
-              salesReturnInfo['return_count'] = ''
131
-              salesReturnInfo['return_total'] = ''
132
-              this.cancelStockTableData.push(salesReturnInfo)
133
-            }
134
-
135
-          }
136
-        })
137
-      },
138
-      GetAllGoodType: function () {
139
-        GetAllGoodType().then(response => {
140
-          if (response.data.state == 0) {
141
-            this.$message.error(response.data.msg);
142
-            return false;
143
-          } else {
144
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
145
-              this.goodType.push(response.data.data.goodType[i])
146
-            }
147
-          }
148
-        });
149
-
150
-
151
-      }, GetAllGoodInfo: function () {
152
-        GetAllGoodInfo().then(response => {
153
-          if (response.data.state == 0) {
154
-            this.$message.error(response.data.msg);
155
-            return false;
156
-          } else {
157
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
158
-              this.goodInfo.push(response.data.data.goodInfo[i])
159
-            }
160
-          }
161
-        });
162
-
163
-      }, getSpecificationName: function (id) {
164
-        let name = ''
165
-        for (let i = 0; i < this.goodInfo.length; i++) {
166
-          if (this.goodInfo[i].id == id) {
167
-            name = this.goodInfo[i].specification_name
168
-          }
169
-
170
-        }
171
-
172
-        return name
173
-
174
-      }, getTypeName: function (id) {
175
-        let name = ''
176
-        for (let i = 0; i < this.goodType.length; i++) {
177
-          if (this.goodType[i].id == id) {
178
-            name = this.goodType[i].type_name
179
-          }
180
-        }
181
-        return name
182
-      }, handleDelete: function (index, row) {
183
-        this.$confirm('确认删除这条退货信息?', '删除退货信息', {
184
-          confirmButtonText: '确定',
185
-          cancelButtonText: '取消',
186
-          type: 'warning'
187
-        }).then(() => {
188
-          this.cancelStockTableData.splice(index, 1)
189
-        }).catch(() => {
190
-        });
191
-
192
-      }, handleBlur: function (index, row) {
193
-        if (this.cancelStockTableData[index].return_count == '') {
194
-          this.$message.error('退货数量不能为空');
195
-          return
196
-        }
197
-        // if (this.salesReturnTableData[index].return_count > this.salesReturnTableData[index].warehousing_count) {
198
-        //   this.salesReturnTableData[index].return_count = ''
199
-        //   this.$message.error('退货数量不能大于入库数量');
200
-        //   return
201
-        // }
202
-      }, handleSave: function () {
203
-        let total = 0
204
-        let ids = []
205
-        for (let i = 0; i < this.cancelStockTableData.length; i++) {
206
-          // if (this.salesReturnTableData[i].return_count > this.salesReturnTableData[i].warehousing_count) {
207
-          //   this.$message.error('退货数量不能大于入库数量');
208
-          //   return
209
-          // }
210
-          if (this.cancelStockTableData[i].return_count == '') {
211
-            this.$message.error('退货数量不能为空');
212
-            return
213
-          }
214
-          ids.push(this.cancelStockTableData[i].id)
215
-          total = total + parseInt(this.cancelStockTableData[i].return_count)
216
-        }
217
-
218
-        let params = {
219
-          'cancelStock':this.cancelStockTableData
220
-        }
221
-        postCancelStock(params,this.return_time,total,ids.join("-"),this.orderNumber).then(response=>{
222
-          if (response.data.state==0) {
223
-            this.$message.error(response.data.msg);
224
-            return false;
225
-          }else {
226
-            this.$notify({
227
-              title: "成功",
228
-              message: "退库成功",
229
-              type: "success",
230
-              duration: 2000
231
-            });
232
-            this.$router.back(-1)
233
-          }
234
-        });
235
-
236
-      }
237
-
238
-    },
239
-    mounted() {
240
-      var year = new Date().getFullYear();
241
-      var month = new Date().getMonth() + 1;
242
-      var day = new Date().getDate();
243
-      if (parseInt(month) < 10) {
244
-        month = "0" + month;
245
-      }
246
-      if (parseInt(day) < 10) {
247
-        day = "0" + day;
248
-      }
249
-      let endTime = year + '-' + month + '-' + day;
250
-      this.return_time = endTime
251
-
252
-      this.GetAllGoodType()
253
-      this.GetAllGoodInfo()
254
-      this.GetWarehouse()
255
-
256
-    },
257
-
258
-
259
-  };
260
-</script>
261
-
262
-<style rel="stylesheet/css" lang="scss" scoped>
263
-  .information {
264
-    border: 1px #dcdfe6 solid;
265
-    padding: 30px 20px 30px 20px;
266
-
267
-    .border {
268
-      border-bottom: 1px #dcdfe6 solid;
269
-      margin: 0px 0 20px 0;
270
-    }
271
-  }
272
-
273
-  .title {
274
-    background: #409eff;
275
-    height: 44px;
276
-    line-height: 44px;
277
-    padding: 0 0 0 10px;
278
-    color: #fff;
279
-    margin: 0 0 10px 0;
280
-    // border-radius: 4px 4px 0 0;
281
-  }
282
-
283
-  .edit_separater {
284
-    border-top: 1px solid rgb(233, 233, 233);
285
-    margin-top: 15px;
286
-    margin-bottom: 15px;
287
-  }
288
-
289
-</style>
290
-
291
-<style>
292
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
293
-    font-size: 12px;
294
-  }
295
-
296
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
297
-    background: #6fb5fa;
298
-  }
299
-
300
-</style>

+ 18 - 24
src/xt_pages/stock/cancelStockOrder.vue Visa fil

17
       </div>
17
       </div>
18
 
18
 
19
       <div class="cell">
19
       <div class="cell">
20
-        <span>出库退库时间:&nbsp;&nbsp;</span>
20
+        <label class="title"><span class="name">退库时间</span> : </label>
21
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
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"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
81
           </el-table-column>
81
           </el-table-column>
82
 
82
 
83
           <el-table-column label="操作" align="center">
83
           <el-table-column label="操作" align="center">
84
-            <template slot-scope="scope">
85
-
86
-              <el-button
87
-                size="mini"
88
-                type="primary"
89
-                icon="el-icon-edit"
90
-                @click="handleEdit(scope.$index, scope.row)">
91
-              </el-button>
92
 
84
 
93
-              <el-button
94
-                size="mini"
95
-                type="danger"
96
-                icon="el-icon-delete"
97
-                @click="handleDelete(scope.$index, scope.row)">
98
-              </el-button>
85
+            <template slot-scope="scope">
86
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
87
+                <el-button
88
+                  size="mini"
89
+                  type="primary"
90
+                  icon="el-icon-edit"
91
+                  @click="handleEdit(scope.$index, scope.row)">
92
+                </el-button>
93
+              </el-tooltip>
94
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
95
+                <el-button
96
+                  size="mini"
97
+                  type="danger"
98
+                  icon="el-icon-delete"
99
+                  @click="handleDelete(scope.$index, scope.row)">
100
+                </el-button>
101
+              </el-tooltip>
99
 
102
 
100
             </template>
103
             </template>
101
           </el-table-column>
104
           </el-table-column>
378
 
381
 
379
   }
382
   }
380
 
383
 
381
-  .title {
382
-    background: #409eff;
383
-    height: 44px;
384
-    line-height: 44px;
385
-    padding: 0 0 0 10px;
386
-    color: #fff;
387
-    margin: 0 0 10px 0;
388
-
389
-  }
390
 
384
 
391
   .edit_separater {
385
   .edit_separater {
392
     border-top: 1px solid rgb(233, 233, 233);
386
     border-top: 1px solid rgb(233, 233, 233);

+ 59 - 64
src/xt_pages/stock/cancelStockOrderAdd.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
 
10
 
7
   <div class="app-container">
11
   <div class="app-container">
13
 
17
 
14
     <div class="filter-container">
18
     <div class="filter-container">
15
 
19
 
16
-      <el-row>
17
-        <el-col :span="8"><div>
18
-          <span>退库时间:</span>
20
+
21
+        <div class="cell">
22
+          <label class="title"><span class="name">退库时间</span> : </label>
23
+
19
           <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
           <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                           value-format="yyyy-MM-dd"></el-date-picker>
26
                           value-format="yyyy-MM-dd"></el-date-picker>
22
-        </div></el-col>
23
-        <el-col :span="8">
24
-          <div>
25
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
26
-              <el-form-item label="厂商:" prop="manufacturer">
27
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
28
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
29
-                </el-select>
30
-              </el-form-item>
31
-            </el-form>
32
-          </div>
33
-        </el-col>
34
-        <el-col :span="8">
35
-          <div>
36
-            <el-form ref="form" :model="form" label-width="80px">
37
-              <el-form-item label="经销商:">
38
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
39
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
40
-                </el-select>
41
-              </el-form-item>
42
-            </el-form>
43
-          </div>
44
-        </el-col>
45
-      </el-row>
27
+        </div>
28
+        <div class="cell clearfix">
29
+          <label class="title"><span class="name">厂商</span> : </label>
30
+          <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
31
+            <el-option
32
+              v-for="(option, index) in manufacturer"
33
+              :key="index"
34
+              :label="option.manufacturer_name"
35
+              :value="option.id">
36
+            </el-option>
37
+          </el-select>
38
+        </div>
39
+
40
+        <div class="cell clearfix">
41
+          <label class="title"><span class="name">经销商</span> : </label>
42
+          <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
43
+            <el-option
44
+              v-for="(option, index) in dealer"
45
+              :key="index"
46
+              :label="option.dealer_name"
47
+              :value="option.id">
48
+            </el-option>
49
+          </el-select>
50
+        </div>
51
+
46
 
52
 
47
     </div>
53
     </div>
48
 
54
 
49
-    <el-row>
50
-      <el-col>
51
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
55
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
52
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
56
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
53
-                    max-height="450"
54
-          >
57
+                    max-height="450"         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
55
 
58
 
56
-            <el-table-column label="操作" align="center" min-width="30">
57
-              <template slot-scope="scope">
58
-                <el-button
59
-                  size="small"
60
-                  icon="el-icon-edit-outline"
61
-                  @click="handleEdit(scope.$index, scope.row)">+
62
-                </el-button>
63
-                <el-button
64
-                  size="small"
65
-                  icon="el-icon-delete"
66
-                  type="danger"
67
-                  @click="handleDelete(scope.$index, scope.row)">-
68
-                </el-button>
69
-              </template>
70
-            </el-table-column>
59
+          >
71
 
60
 
72
             <el-table-column min-width="35" align="center">
61
             <el-table-column min-width="35" align="center">
73
 
62
 
102
               </template>
91
               </template>
103
               <template slot-scope="scope">
92
               <template slot-scope="scope">
104
                 <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
93
                 <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count' style="padding-top: 17px">
105
-                  <el-input type="number"  v-model="scope.row.return_count" ></el-input>
94
+                  <el-input placeholder="请输入退库数量" type="number"  v-model="scope.row.return_count" ></el-input>
106
                 </el-form-item>
95
                 </el-form-item>
107
               </template>
96
               </template>
108
             </el-table-column>
97
             </el-table-column>
98
+            <el-table-column label="操作" align="center" min-width="20">
99
+              <template slot-scope="scope">
100
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
101
+
102
+                  <el-button
103
+                    size="mini"
104
+                    type="primary"
105
+                    icon="el-icon-circle-plus-outline"
106
+                    @click="handleEdit(scope.$index, scope.row)">
107
+                  </el-button>
108
+                </el-tooltip>
109
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
110
+
111
+                  <el-button
112
+                    size="mini"
113
+                    type="danger"
114
+                    icon="el-icon-remove-outline"
115
+                    @click="handleDelete(scope.$index, scope.row)">
116
+                  </el-button>
117
+                </el-tooltip>
118
+
119
+              </template>
120
+            </el-table-column>
109
           </el-table>
121
           </el-table>
110
         </el-form>
122
         </el-form>
111
-      </el-col>
112
 
123
 
113
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
114
-        <el-button @click="back()">取 消</el-button>
115
-        <el-button type="primary" @click="submit()">确 定</el-button>
116
-      </span>
117
-
118
-    </el-row>
119
   </div>
124
   </div>
120
   </div>
125
   </div>
121
 </template>
126
 </template>
376
   }
381
   }
377
   }
382
   }
378
 
383
 
379
-  .title {
380
-    background: #409eff;
381
-    height: 44px;
382
-    line-height: 44px;
383
-    padding: 0 0 0 10px;
384
-    color: #fff;
385
-    margin: 0 0 10px 0;
386
-  // border-radius: 4px 4px 0 0;
387
-  }
388
-
389
   .edit_separater {
384
   .edit_separater {
390
     border-top: 1px solid rgb(233, 233, 233);
385
     border-top: 1px solid rgb(233, 233, 233);
391
     margin-top: 15px;
386
     margin-top: 15px;

+ 1 - 8
src/xt_pages/stock/cancelStockOrderDetail.vue Visa fil

27
 
27
 
28
     <el-row :gutter="12" style="margin-top: 10px">
28
     <el-row :gutter="12" style="margin-top: 10px">
29
       <el-table :data="CancelStockInfo.cancelStockInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
29
       <el-table :data="CancelStockInfo.cancelStockInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
+                :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
30
       >
31
       >
31
         <el-table-column min-width="35" align="center">
32
         <el-table-column min-width="35" align="center">
32
           <template slot="header" slot-scope="scope">
33
           <template slot="header" slot-scope="scope">
210
 
211
 
211
   }
212
   }
212
 
213
 
213
-  .title {
214
-    background: #409eff;
215
-    height: 44px;
216
-    line-height: 44px;
217
-    padding: 0 0 0 10px;
218
-    color: #fff;
219
-    margin: 0 0 10px 0;
220
-  }
221
 
214
 
222
   .edit_separater {
215
   .edit_separater {
223
     border-top: 1px solid rgb(233, 233, 233);
216
     border-top: 1px solid rgb(233, 233, 233);

+ 87 - 95
src/xt_pages/stock/cancelStockOrderEdit.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
     <div class="app-container">
10
     <div class="app-container">
7
       <sales-return-dialog :propForm="propForm"
11
       <sales-return-dialog :propForm="propForm"
9
                            v-on:dialog-comfirm="comfirm"
13
                            v-on:dialog-comfirm="comfirm"
10
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
14
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
11
 
15
 
12
-      <div class="filter-container">
13
-
14
-        <el-row>
15
-          <el-col :span="8">
16
-            <div>
17
-              <span>退库时间:</span>
18
-              <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
-                              type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
-                              value-format="yyyy-MM-dd"></el-date-picker>
21
-            </div>
22
-          </el-col>
23
-        </el-row>
16
+      <div class="cell">
17
+
18
+        <label class="title"><span class="name">退库时间</span> : </label>
19
+        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
+                        value-format="yyyy-MM-dd"></el-date-picker>
24
       </div>
22
       </div>
25
 
23
 
26
-      <el-row>
27
-        <el-col>
28
-          <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
29
-            <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
-                      max-height="450"
31
-            >
32
-
33
-              <el-table-column label="操作" align="center" min-width="30">
34
-                <template slot-scope="scope">
35
-                  <el-button
36
-                    size="mini"
37
-                    @click="handleEdit(scope.$index, scope.row)">+
38
-                  </el-button>
39
-                  <el-button
40
-                    size="mini"
41
-                    type="danger"
42
-                    @click="handleDelete(scope.$index, scope.row)">-
43
-                  </el-button>
44
-                </template>
45
-              </el-table-column>
46
-
47
-              <el-table-column min-width="35" align="center">
48
-
49
-                <template slot="header" slot-scope="scope">
50
-                  <span>物品类型<span style="color: red">*</span></span>
51
-                </template>
52
-
53
-                <template slot-scope="scope">
54
-                  <el-form-item style="padding-top: 15px">
55
-                    <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
56
-                              :value="typeName(scope.row.good_type_id)"
57
-                              @focus="showDialog(scope.$index, scope.row)"></el-input>
58
-                  </el-form-item>
59
-                </template>
60
-              </el-table-column>
61
-              <el-table-column min-width="35" align="center">
62
-                <template slot="header" slot-scope="scope">
63
-                  <span>规格名称<span style="color: red">*</span></span>
64
-                </template>
65
-                <template slot-scope="scope">
66
-
67
-                  <el-form-item style="padding-top: 15px">
68
-                    <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
69
-                              :value="specificationName(scope.row.good_id)"
70
-                              @focus="showDialog(scope.$index, scope.row)"></el-input>
71
-                  </el-form-item>
72
-
73
-                </template>
74
-              </el-table-column>
75
-
76
-
77
-              <el-table-column min-width="23" align="center">
78
-                <template slot="header" slot-scope="scope">
79
-                  <span>退货数量<span style="color: red">*</span></span>
80
-                </template>
81
-                <template slot-scope="scope">
82
-                  <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
83
-                                style="padding-top: 17px">
84
-                    <el-input type="number" v-model="scope.row.count"></el-input>
85
-                  </el-form-item>
86
-                </template>
87
-              </el-table-column>
88
-
89
-
90
-            </el-table>
91
-          </el-form>
92
-        </el-col>
93
-
94
-
95
-        <span class="dialog-footer" style="margin-top: 20px;float:right">
96
-        <el-button @click="back()">取 消</el-button>
97
-        <el-button type="primary" @click="submit()">确 定</el-button>
98
-      </span>
99
-      </el-row>
24
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
+                  max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27
+        >
28
+
29
+
30
+          <el-table-column min-width="35" align="center">
31
+
32
+            <template slot="header" slot-scope="scope">
33
+              <span>物品类型<span style="color: red">*</span></span>
34
+            </template>
35
+
36
+            <template slot-scope="scope">
37
+              <el-form-item style="padding-top: 15px">
38
+                <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
39
+                          :value="typeName(scope.row.good_type_id)"
40
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
41
+              </el-form-item>
42
+            </template>
43
+          </el-table-column>
44
+          <el-table-column min-width="35" align="center">
45
+            <template slot="header" slot-scope="scope">
46
+              <span>规格名称<span style="color: red">*</span></span>
47
+            </template>
48
+            <template slot-scope="scope">
49
+
50
+              <el-form-item style="padding-top: 15px">
51
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
52
+                          :value="specificationName(scope.row.good_id)"
53
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
54
+              </el-form-item>
55
+
56
+            </template>
57
+          </el-table-column>
58
+
59
+
60
+          <el-table-column min-width="23" align="center">
61
+            <template slot="header" slot-scope="scope">
62
+              <span>退货数量<span style="color: red">*</span></span>
63
+            </template>
64
+            <template slot-scope="scope">
65
+              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
66
+                            style="padding-top: 17px">
67
+                <el-input type="number" v-model="scope.row.count"></el-input>
68
+              </el-form-item>
69
+            </template>
70
+          </el-table-column>
71
+
72
+          <el-table-column label="操作" align="center" min-width="20">
73
+            <template slot-scope="scope">
74
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
75
+
76
+                <el-button
77
+                  size="mini"
78
+                  type="primary"
79
+                  icon="el-icon-circle-plus-outline"
80
+                  @click="handleEdit(scope.$index, scope.row)">
81
+                </el-button>
82
+              </el-tooltip>
83
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
84
+
85
+                <el-button
86
+                  size="mini"
87
+                  type="danger"
88
+                  icon="el-icon-remove-outline"
89
+                  @click="handleDelete(scope.$index, scope.row)">
90
+                </el-button>
91
+              </el-tooltip>
92
+
93
+            </template>
94
+          </el-table-column>
95
+
96
+
97
+        </el-table>
98
+      </el-form>
99
+
100
     </div>
100
     </div>
101
   </div>
101
   </div>
102
 
102
 
366
 
366
 
367
   }
367
   }
368
 
368
 
369
-  .title {
370
-    background: #409eff;
371
-    height: 44px;
372
-    line-height: 44px;
373
-    padding: 0 0 0 10px;
374
-    color: #fff;
375
-    margin: 0 0 10px 0;
376
-    border-radius: 4px 4px 0 0;
377
-  }
369
+
378
 
370
 
379
   .edit_separater {
371
   .edit_separater {
380
     border-top: 1px solid rgb(233, 233, 233);
372
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 388
src/xt_pages/stock/cancelStockRecord.vue Visa fil

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

+ 20 - 25
src/xt_pages/stock/otherCancelStockOrder.vue Visa fil

16
       </div>
16
       </div>
17
 
17
 
18
       <div class="cell">
18
       <div class="cell">
19
-        <span>其他出库退库时间:&nbsp;&nbsp;</span>
19
+        <label class="title"><span class="name">退库时间</span> : </label>
20
+
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
78
               {{getDealerName(scope.row.dealer)}}
79
               {{getDealerName(scope.row.dealer)}}
79
             </template>
80
             </template>
80
           </el-table-column>
81
           </el-table-column>
81
-
82
           <el-table-column label="操作" align="center">
82
           <el-table-column label="操作" align="center">
83
+
83
             <template slot-scope="scope">
84
             <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>
85
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
86
+                <el-button
87
+                  size="mini"
88
+                  type="primary"
89
+                  icon="el-icon-edit"
90
+                  @click="handleEdit(scope.$index, scope.row)">
91
+                </el-button>
92
+              </el-tooltip>
93
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
94
+                <el-button
95
+                  size="mini"
96
+                  type="danger"
97
+                  icon="el-icon-delete"
98
+                  @click="handleDelete(scope.$index, scope.row)">
99
+                </el-button>
100
+              </el-tooltip>
97
 
101
 
98
             </template>
102
             </template>
99
           </el-table-column>
103
           </el-table-column>
273
           }
277
           }
274
         }
278
         }
275
       }, handleEdit: function(index, row) {
279
       }, handleEdit: function(index, row) {
276
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id }})
280
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
277
       }, handleDelete: function(index, row) {
281
       }, handleDelete: function(index, row) {
278
         const ids = []
282
         const ids = []
279
         ids.push(row.id)
283
         ids.push(row.id)
376
 
380
 
377
   }
381
   }
378
 
382
 
379
-  .title {
380
-    background: #409eff;
381
-    height: 44px;
382
-    line-height: 44px;
383
-    padding: 0 0 0 10px;
384
-    color: #fff;
385
-    margin: 0 0 10px 0;
386
-
387
-  }
388
 
383
 
389
   .edit_separater {
384
   .edit_separater {
390
     border-top: 1px solid rgb(233, 233, 233);
385
     border-top: 1px solid rgb(233, 233, 233);

+ 9 - 10
src/xt_pages/stock/otherSalesReturnOrder.vue Visa fil

15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
18
-      <div class="filter-container">
19
-        <span>其他退货时间:&nbsp;&nbsp;</span>
18
+      <div class="cell">
19
+        <label class="title"><span class="name">退货时间</span> : </label>
20
+
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
81
 
82
 
82
           <el-table-column label="操作" align="center">
83
           <el-table-column label="操作" align="center">
83
             <template slot-scope="scope">
84
             <template slot-scope="scope">
85
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
86
+
84
               <el-button
87
               <el-button
85
                 size="mini"
88
                 size="mini"
86
                 type="primary"
89
                 type="primary"
87
                 icon="el-icon-edit"
90
                 icon="el-icon-edit"
88
                 @click="handleEdit(scope.$index, scope.row)">
91
                 @click="handleEdit(scope.$index, scope.row)">
89
               </el-button>
92
               </el-button>
93
+              </el-tooltip>
94
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
90
 
95
 
91
               <el-button
96
               <el-button
92
                 size="mini"
97
                 size="mini"
94
                 icon="el-icon-delete"
99
                 icon="el-icon-delete"
95
                 @click="handleDelete(scope.$index, scope.row)">
100
                 @click="handleDelete(scope.$index, scope.row)">
96
               </el-button>
101
               </el-button>
102
+              </el-tooltip>
103
+
97
 
104
 
98
             </template>
105
             </template>
99
           </el-table-column>
106
           </el-table-column>
383
 
390
 
384
   }
391
   }
385
 
392
 
386
-  .title {
387
-    background: #409eff;
388
-    height: 44px;
389
-    line-height: 44px;
390
-    padding: 0 0 0 10px;
391
-    color: #fff;
392
-    margin: 0 0 10px 0;
393
 
393
 
394
-  }
395
 
394
 
396
   .edit_separater {
395
   .edit_separater {
397
     border-top: 1px solid rgb(233, 233, 233);
396
     border-top: 1px solid rgb(233, 233, 233);

+ 5 - 12
src/xt_pages/stock/otherStockInOrder.vue Visa fil

10
     <div class="app-container">
10
     <div class="app-container">
11
 
11
 
12
       <div class="cell">
12
       <div class="cell">
13
-        <el-input style="width: 300px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
13
+        <el-input style="width: 400px;" class="filter-item" placeholder="单据日期/单据编码/制单人/供应商"/>
14
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
       </div>
15
       </div>
16
 
16
 
17
       <div class="cell">
17
       <div class="cell">
18
-        <span>其他入库时间:&nbsp;&nbsp;</span>
18
+        <label class="title"><span class="name">入库时间</span> : </label>
19
+
19
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
81
 
82
 
82
         <el-table-column label="操作" align="center">
83
         <el-table-column label="操作" align="center">
83
           <template slot-scope="scope">
84
           <template slot-scope="scope">
84
-            <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
85
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
85
               <el-button
86
               <el-button
86
                 size="small"
87
                 size="small"
87
                 type="primary"
88
                 type="primary"
376
           }
377
           }
377
         }
378
         }
378
       }, handleEdit: function(index, row) {
379
       }, handleEdit: function(index, row) {
379
-        this.$router.push({ name: 'stockInDetail', query: { id: row.id }})
380
+        this.$router.push({ name: 'stockInDetail', query: { id: row.id ,type:this.type}})
380
       }, handleDelete: function(index, row) {
381
       }, handleDelete: function(index, row) {
381
         const ids = []
382
         const ids = []
382
         ids.push(row.id)
383
         ids.push(row.id)
479
 
480
 
480
   }
481
   }
481
 
482
 
482
-  .title {
483
-    background: #409eff;
484
-    height: 44px;
485
-    line-height: 44px;
486
-    padding: 0 0 0 10px;
487
-    color: #fff;
488
-    margin: 0 0 10px 0;
489
 
483
 
490
-  }
491
 
484
 
492
   .edit_separater {
485
   .edit_separater {
493
     border-top: 1px solid rgb(233, 233, 233);
486
     border-top: 1px solid rgb(233, 233, 233);

+ 49 - 49
src/xt_pages/stock/otherStockOutOrder.vue Visa fil

3
   <div class="main-contain">
3
   <div class="main-contain">
4
     <div class="position">
4
     <div class="position">
5
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
       <bread-crumb :crumbs='crumbs'></bread-crumb>
6
-      <el-button size="small"  @click="AddNewOrder" class="filter-item" style="float:right;" type="primary" icon="el-icon-circle-plus-outline" >新增</el-button>
6
+      <el-button size="small" @click="AddNewOrder" class="filter-item" style="float:right;" type="primary"
7
+                 icon="el-icon-circle-plus-outline">新增
8
+      </el-button>
7
     </div>
9
     </div>
8
     <div class="app-container">
10
     <div class="app-container">
9
       <div class="cell">
11
       <div class="cell">
13
 
15
 
14
 
16
 
15
       <div class="cell">
17
       <div class="cell">
16
-        <span>其他出库时间:&nbsp;&nbsp;</span>
18
+        <label class="title"><span class="name">出库时间</span> : </label>
19
+
17
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
73
         </el-table-column>
76
         </el-table-column>
74
 
77
 
75
         <el-table-column label="操作" align="center">
78
         <el-table-column label="操作" align="center">
79
+
76
           <template slot-scope="scope">
80
           <template slot-scope="scope">
77
-            <el-button
78
-              size="mini"
79
-              type="primary"
80
-              icon="el-icon-edit"
81
-              @click="handleEdit(scope.$index, scope.row)">
82
-            </el-button>
83
-
84
-            <el-button
85
-              size="mini"
86
-              type="danger"
87
-              icon="el-icon-delete"
88
-              @click="handleDelete(scope.$index, scope.row)">
89
-            </el-button>
81
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
82
+
83
+              <el-button
84
+                size="mini"
85
+                type="primary"
86
+                icon="el-icon-edit"
87
+                @click="handleEdit(scope.$index, scope.row)">
88
+              </el-button>
89
+            </el-tooltip>
90
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
91
+
92
+              <el-button
93
+                size="mini"
94
+                type="danger"
95
+                icon="el-icon-delete"
96
+                @click="handleDelete(scope.$index, scope.row)">
97
+              </el-button>
98
+            </el-tooltip>
99
+
90
           </template>
100
           </template>
91
         </el-table-column>
101
         </el-table-column>
92
       </el-table>
102
       </el-table>
106
   </div>
116
   </div>
107
 
117
 
108
 
118
 
109
-
110
-
111
-
112
 </template>
119
 </template>
113
 
120
 
114
 <script>
121
 <script>
115
   import { uParseTime } from '@/utils/tools'
122
   import { uParseTime } from '@/utils/tools'
116
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
123
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
117
 
124
 
118
-  import {
119
-    deleteWarehouseOut,
120
-    GetAllConfig,
121
-    getWarehouseOutList
122
-  } from '@/api/stock'
125
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutList } from '@/api/stock'
123
   import BreadCrumb from '../components/bread-crumb'
126
   import BreadCrumb from '../components/bread-crumb'
124
 
127
 
125
   export default {
128
   export default {
182
     },
185
     },
183
     methods: {
186
     methods: {
184
       AddNewOrder: function() {
187
       AddNewOrder: function() {
185
-        this.$router.push({ name: 'stockOutOrderAdd', query: { type: this.type }})
188
+        this.$router.push({ name: 'stockOutOrderAdd', query: { type: this.type } })
186
       },
189
       },
187
       GetWarehouseOut: function() {
190
       GetWarehouseOut: function() {
188
         const Params = {
191
         const Params = {
273
           }
276
           }
274
         }
277
         }
275
       }, handleEdit: function(index, row) {
278
       }, handleEdit: function(index, row) {
276
-        this.$router.push({ name: 'stockOutDetail', query: { id: row.id, type: this.type }})
279
+        this.$router.push({ name: 'stockOutDetail', query: { id: row.id, type: this.type } })
277
       }, handleDelete: function(index, row) {
280
       }, handleDelete: function(index, row) {
278
         const ids = []
281
         const ids = []
279
         ids.push(row.id)
282
         ids.push(row.id)
366
 
369
 
367
 <style rel="stylesheet/scss" lang="scss" scoped>
370
 <style rel="stylesheet/scss" lang="scss" scoped>
368
   .app-container {
371
   .app-container {
369
-  // margin: 20px;
372
+
370
     font-size: 15px;
373
     font-size: 15px;
374
+
371
   .filter-container {
375
   .filter-container {
372
     padding-bottom: 5px;
376
     padding-bottom: 5px;
373
   }
377
   }
378
+
374
   .search-component {
379
   .search-component {
375
     width: 500px;
380
     width: 500px;
381
+
376
   .searchBox {
382
   .searchBox {
377
     width: 300px;
383
     width: 300px;
378
     height: 36px;
384
     height: 36px;
388
     background: #fff;
394
     background: #fff;
389
     box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
395
     box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
390
   }
396
   }
397
+
391
   .searchBtn {
398
   .searchBtn {
392
     background-color: #409eff;
399
     background-color: #409eff;
393
     color: #fff;
400
     color: #fff;
403
     font-family: "Microsoft Yahei";
410
     font-family: "Microsoft Yahei";
404
     cursor: pointer;
411
     cursor: pointer;
405
   }
412
   }
413
+
406
   }
414
   }
407
   .cell {
415
   .cell {
408
     margin: 0px 0 15px 0;
416
     margin: 0px 0 15px 0;
413
     box-sizing: border-box;
421
     box-sizing: border-box;
414
     display: -webkit-box;
422
     display: -webkit-box;
415
     display: -ms-flexbox;
423
     display: -ms-flexbox;
416
-  // display: flex;
417
     -webkit-box-align: flex-start;
424
     -webkit-box-align: flex-start;
418
     -ms-flex-align: flex-start;
425
     -ms-flex-align: flex-start;
419
     align-items: flex-start;
426
     align-items: flex-start;
420
     text-align: left;
427
     text-align: left;
421
     justify-content: flex-start;
428
     justify-content: flex-start;
422
     color: #333;
429
     color: #333;
423
-  .title {
424
-    width: 80px;
425
-    display: inline-block;
426
-    font-weight: normal;
427
-    color: #909399;
428
-    padding: 6px 0;
429
-    font-weight: 700;
430
-  .name {
431
-    width: 60px;
432
-    text-align: justify;
433
-    text-justify: distribute-all-lines;
434
-    text-align-last: justify;
435
-    -moz-text-align-last: justify;
436
-    -webkit-text-align-last: justify;
437
-    display: inline-block;
438
-  }
439
-  }
430
+
431
+
440
   .time {
432
   .time {
441
     -webkit-box-flex: 1;
433
     -webkit-box-flex: 1;
442
     -ms-flex: 1;
434
     -ms-flex: 1;
443
     flex: 1;
435
     flex: 1;
436
+
444
   ul {
437
   ul {
445
     padding: 0;
438
     padding: 0;
446
     margin: 0;
439
     margin: 0;
440
+
447
   li {
441
   li {
448
     float: left;
442
     float: left;
449
     list-style: none;
443
     list-style: none;
455
     margin: 0 10px 0 0;
449
     margin: 0 10px 0 0;
456
     color: #409eff;
450
     color: #409eff;
457
     border: 1px #409eff solid;
451
     border: 1px #409eff solid;
458
-    text-align:center;
459
-  &:hover {
460
-     background: #409eff;
461
-     color: #fff;
462
-   }
452
+    text-align: center;
453
+
454
+  &
455
+  :hover {
456
+    background: #409eff;
457
+    color: #fff;
458
+  }
459
+
463
   }
460
   }
464
   .active {
461
   .active {
465
     background: #409eff;
462
     background: #409eff;
466
     color: #fff;
463
     color: #fff;
467
   }
464
   }
465
+
468
   }
466
   }
469
   }
467
   }
470
   }
468
   }
473
     padding: 10px 0 0 0;
471
     padding: 10px 0 0 0;
474
     color: #606266;
472
     color: #606266;
475
     font-size: 14px;
473
     font-size: 14px;
474
+
476
   span {
475
   span {
477
     color: #ef2525;
476
     color: #ef2525;
478
     font-family: "Arial";
477
     font-family: "Arial";
479
     padding: 0 2px;
478
     padding: 0 2px;
480
   }
479
   }
480
+
481
   }
481
   }
482
   }
482
   }
483
 </style>
483
 </style>

+ 0 - 315
src/xt_pages/stock/salesReturn.vue Visa fil

1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-circle-check" @click="handleSave" type="primary">保 存</el-button>
7
-    </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-     <label class="title"><span class="name">入库退货时间:</span></label>
12
-      <el-date-picker v-model="return_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"></el-date-picker>
15
-
16
-      
17
-    </div>
18
-
19
-
20
-    <el-row>
21
-      <el-col>
22
-        <div class="titleTop">入库退货列表</div>
23
-        <div style="margin-bottom: 10px;"></div>
24
-        <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="salesReturnTableData" :class="signAndWeighBoxPatients" style="width: 100%" border
25
-        >
26
-          <el-table-column label="入库单号" min-width="30" align="center">
27
-            <template slot-scope="scope">
28
-              {{scope.row.warehousing_order}}
29
-            </template>
30
-          </el-table-column>
31
-
32
-          <el-table-column label="规格名称" align="center" min-width="30">
33
-            <template slot-scope="scope">
34
-              {{getSpecificationName(scope.row.good_id)}}
35
-
36
-            </template>
37
-          </el-table-column>
38
-          <el-table-column label="物品类型" min-width="30" align="center">
39
-            <template slot-scope="scope">
40
-              {{getTypeName(scope.row.good_type_id)}}
41
-
42
-            </template>
43
-          </el-table-column>
44
-          <el-table-column label="入库数量" min-width="30" align="center">
45
-            <template slot-scope="scope">
46
-              {{scope.row.warehousing_count}}
47
-
48
-            </template>
49
-          </el-table-column>
50
-
51
-          <el-table-column label="入库单价" min-width="30" align="center">
52
-            <template slot-scope="scope">
53
-              {{scope.row.price}}
54
-
55
-            </template>
56
-          </el-table-column>
57
-
58
-          <el-table-column label="退货数量" min-width="30" align="center">
59
-            <template slot-scope="scope">
60
-              <el-input type="number" v-model="scope.row.return_count" @blur="handleBlur(scope.$index, scope.row)"></el-input>
61
-            </template>
62
-          </el-table-column>
63
-          <el-table-column label="操作" align="center" min-width="30">
64
-            <template slot-scope="scope">
65
-              <el-tooltip class="item" effect="dark" content="删除" placement="top">
66
-                  <el-button
67
-                    size="small"
68
-                    type="danger"
69
-                    icon="el-icon-delete"
70
-                    @click="handleDelete(scope.$index, scope.row)">
71
-                  </el-button>
72
-              </el-tooltip>
73
-
74
-            </template>
75
-          </el-table-column>
76
-        </el-table>
77
-      </el-col>
78
-
79
-    </el-row>
80
-  </div>
81
-   
82
-  </div>
83
-</template>
84
-
85
-<script>
86
-  import {uParseTime} from "@/utils/tools";
87
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
88
-  import {
89
-    GetAllGoodInfo,
90
-    GetAllGoodType,
91
-    postSalesReturn,
92
-    getWarehouseInfo
93
-  } from "@/api/stock";
94
-
95
-  export default {
96
-    name: "stockIn",
97
-    components:{
98
-      BreadCrumb
99
-    },
100
-    data() {
101
-      return {
102
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
103
-        return_time: '',
104
-        adminUserOptions: null,
105
-        salesReturnTableData: [],
106
-        total: '',
107
-        isVisibility: false,
108
-        goodInfo: [],
109
-        goodType: [],
110
-        isClick: false,
111
-        OrderNumber:'',
112
-      };
113
-    },
114
-    methods: {
115
-      GetWarehouse:function () {
116
-        let params ={
117
-          ids:this.$route.query.id
118
-        }
119
-        getWarehouseInfo(params).then(response =>{
120
-          if(response.data.state == 0){
121
-              this.$message.error(response.data.msg)
122
-              return false
123
-          }else{
124
-            this.salesReturnTableData = []
125
-            for (let i = 0; i < response.data.data.info.length; i++) {
126
-              let salesReturnInfo = {}
127
-              this.OrderNumber = response.data.data.info[i].Warehousing.warehousing_order
128
-              salesReturnInfo['id'] = response.data.data.info[i].id
129
-              salesReturnInfo['warehousing_order'] = response.data.data.info[i].Warehousing.warehousing_order
130
-              salesReturnInfo['good_id'] = response.data.data.info[i].good_id
131
-              salesReturnInfo['good_type_id'] = response.data.data.info[i].good_type_id
132
-              salesReturnInfo['warehousing_count'] = response.data.data.info[i].warehousing_count
133
-              salesReturnInfo['price'] = response.data.data.info[i].price
134
-              salesReturnInfo['return_count'] = ''
135
-              salesReturnInfo['return_total'] = ''
136
-              this.salesReturnTableData.push(salesReturnInfo)
137
-            }
138
-
139
-          }
140
-        })
141
-      },
142
-      GetAllGoodType: function () {
143
-        GetAllGoodType().then(response => {
144
-          if (response.data.state == 0) {
145
-            this.$message.error(response.data.msg);
146
-            return false;
147
-          } else {
148
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
149
-              this.goodType.push(response.data.data.goodType[i])
150
-            }
151
-          }
152
-        });
153
-
154
-
155
-      }, GetAllGoodInfo: function () {
156
-        GetAllGoodInfo().then(response => {
157
-          if (response.data.state == 0) {
158
-            this.$message.error(response.data.msg);
159
-            return false;
160
-          } else {
161
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
162
-              this.goodInfo.push(response.data.data.goodInfo[i])
163
-            }
164
-          }
165
-        });
166
-
167
-      }, getSpecificationName: function (id) {
168
-        let name = ''
169
-        for (let i = 0; i < this.goodInfo.length; i++) {
170
-          if (this.goodInfo[i].id == id) {
171
-            name = this.goodInfo[i].specification_name
172
-          }
173
-
174
-        }
175
-
176
-        return name
177
-
178
-      }, getTypeName: function (id) {
179
-        let name = ''
180
-        for (let i = 0; i < this.goodType.length; i++) {
181
-          if (this.goodType[i].id == id) {
182
-            name = this.goodType[i].type_name
183
-          }
184
-        }
185
-        return name
186
-      }, handleDelete: function (index, row) {
187
-        this.$confirm('确认删除这条退货信息?', '删除退货信息', {
188
-          confirmButtonText: '确定',
189
-          cancelButtonText: '取消',
190
-          type: 'warning'
191
-        }).then(() => {
192
-          this.salesReturnTableData.splice(index, 1)
193
-        }).catch(() => {
194
-        });
195
-
196
-      }, handleBlur: function (index, row) {
197
-        if (this.salesReturnTableData[index].return_count == '') {
198
-          this.$message.error('退货数量不能为空');
199
-          return
200
-        }
201
-        // if (this.salesReturnTableData[index].return_count > this.salesReturnTableData[index].warehousing_count) {
202
-        //   this.salesReturnTableData[index].return_count = ''
203
-        //   this.$message.error('退货数量不能大于入库数量');
204
-        //   return
205
-        // }
206
-      }, handleSave: function () {
207
-
208
-        let total = 0
209
-        let ids = []
210
-        if(this.salesReturnTableData.length <= 0){
211
-          this.$message.error('请新增退货的物品');
212
-          return
213
-        }
214
-
215
-        for (let i = 0; i < this.salesReturnTableData.length; i++) {
216
-          // if (this.salesReturnTableData[i].return_count > this.salesReturnTableData[i].warehousing_count) {
217
-          //   this.$message.error('退货数量不能大于入库数量');
218
-          //   return
219
-          // }
220
-          if (this.salesReturnTableData[i].return_count == '') {
221
-            this.$message.error('退货数量不能为空');
222
-            return
223
-          }
224
-          ids.push(this.salesReturnTableData[i].id)
225
-          total = total + parseInt(this.salesReturnTableData[i].return_count)
226
-        }
227
-
228
-
229
-
230
-
231
-        let params = {
232
-          'salesReturn':this.salesReturnTableData
233
-        }
234
-        postSalesReturn(params,this.return_time,total,ids.join("-"),this.OrderNumber).then(response=>{
235
-          if (response.data.state==0) {
236
-            this.$message.error(response.data.msg);
237
-            return false;
238
-          }else {
239
-            this.$notify({
240
-              title: "成功",
241
-              message: "退货成功",
242
-              type: "success",
243
-              duration: 2000
244
-            });
245
-            this.$router.back(-1)
246
-          }
247
-        });
248
-
249
-      }
250
-
251
-    },
252
-    mounted() {
253
-      var year = new Date().getFullYear();
254
-      var month = new Date().getMonth() + 1;
255
-      var day = new Date().getDate();
256
-      if (parseInt(month) < 10) {
257
-        month = "0" + month;
258
-      }
259
-      if (parseInt(day) < 10) {
260
-        day = "0" + day;
261
-      }
262
-      let endTime = year + '-' + month + '-' + day;
263
-      this.return_time = endTime
264
-
265
-      this.GetAllGoodType()
266
-      this.GetAllGoodInfo()
267
-      this.GetWarehouse()
268
-
269
-
270
-    },
271
-
272
-
273
-  };
274
-</script>
275
-
276
-<style rel="stylesheet/css" lang="scss" scoped>
277
-  .information {
278
-    border: 1px #dcdfe6 solid;
279
-    padding: 30px 20px 30px 20px;
280
-
281
-    .border {
282
-      border-bottom: 1px #dcdfe6 solid;
283
-      margin: 0px 0 20px 0;
284
-    }
285
-  }
286
-
287
-  .titleTop {
288
-    background: #409eff;
289
-    height: 44px;
290
-    line-height: 44px;
291
-    padding: 0 0 0 10px;
292
-    color: #fff;
293
-    margin: 0 0 10px 0;
294
-    // border-radius: 4px 4px 0 0;
295
-        font-size: 14px;
296
-  }
297
-
298
-  .edit_separater {
299
-    border-top: 1px solid rgb(233, 233, 233);
300
-    margin-top: 15px;
301
-    margin-bottom: 15px;
302
-  }
303
-
304
-</style>
305
-
306
-<style>
307
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
308
-    font-size: 12px;
309
-  }
310
-
311
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
312
-    background: #6fb5fa;
313
-  }
314
-
315
-</style>

+ 33 - 50
src/xt_pages/stock/salesReturnEdit.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
 
10
 
7
   <div class="app-container">
11
   <div class="app-container">
11
                      v-on:dialog-comfirm="comfirm"
15
                      v-on:dialog-comfirm="comfirm"
12
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
16
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
13
 
17
 
14
-    <div class="filter-container">
15
-
16
-      <el-row>
17
-        <el-col :span="8">
18
-          <div>
19
-            <span>退货时间:</span>
18
+    <div class="cell">
19
+            <label class="title"><span class="name">退货时间</span> : </label>
20
             <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
             <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                             value-format="yyyy-MM-dd"></el-date-picker>
22
                             value-format="yyyy-MM-dd"></el-date-picker>
23
-          </div>
24
-        </el-col>
25
-      </el-row>
26
     </div>
23
     </div>
27
 
24
 
28
-    <el-row>
29
-      <el-col>
30
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
31
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
32
-                    max-height="450"
27
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
33
           >
28
           >
34
 
29
 
35
-            <el-table-column label="操作" align="center" min-width="30">
36
-              <template slot-scope="scope">
37
-                 <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
38
-                  <el-button
39
-                    size="small"
40
-                    type="primary"
41
-                    icon="el-icon-edit"
42
-                    @click="handleEdit(scope.$index, scope.row)">
43
-                  </el-button>
44
-                  </el-tooltip>
45
-                  <el-tooltip class="item" effect="dark" content="删除" placement="top">
46
-                    <el-button
47
-                      size="small"
48
-                      type="danger"
49
-                      icon="el-icon-delete"
50
-                      @click="handleDelete(scope.$index, scope.row)">
51
-                    </el-button>
52
-                </el-tooltip>
53
-              </template>
54
-            </el-table-column>
30
+
55
 
31
 
56
             <el-table-column min-width="35" align="center">
32
             <el-table-column min-width="35" align="center">
57
 
33
 
90
               <template slot-scope="scope">
66
               <template slot-scope="scope">
91
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
67
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
92
                               style="padding-top: 17px">
68
                               style="padding-top: 17px">
93
-                  <el-input type="number" v-model="scope.row.count"></el-input>
69
+                  <el-input  placeholder="请输入退货数量" type="number" v-model="scope.row.count"></el-input>
94
                 </el-form-item>
70
                 </el-form-item>
95
               </template>
71
               </template>
96
             </el-table-column>
72
             </el-table-column>
97
 
73
 
74
+            <el-table-column label="操作" align="center" min-width="20">
75
+              <template slot-scope="scope">
76
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
98
 
77
 
99
-          </el-table>
100
-        </el-form>
101
-      </el-col>
78
+                  <el-button
79
+                    size="mini"
80
+                    type="primary"
81
+                    icon="el-icon-circle-plus-outline"
82
+                    @click="handleEdit(scope.$index, scope.row)">
83
+                  </el-button>
84
+                </el-tooltip>
85
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
86
+
87
+                  <el-button
88
+                    size="mini"
89
+                    type="danger"
90
+                    icon="el-icon-remove-outline"
91
+                    @click="handleDelete(scope.$index, scope.row)">
92
+                  </el-button>
93
+                </el-tooltip>
102
 
94
 
95
+              </template>
96
+            </el-table-column>
103
 
97
 
104
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
105
-        <el-button @click="back()">取 消</el-button>
106
-        <el-button type="primary" @click="submit()">确 定</el-button>
107
-      </span>
108
 
98
 
109
-    </el-row>
99
+          </el-table>
100
+        </el-form>
110
   </div>
101
   </div>
111
   </div>
102
   </div>
112
 
103
 
382
 
373
 
383
   }
374
   }
384
 
375
 
385
-  .title {
386
-    background: #409eff;
387
-    height: 44px;
388
-    line-height: 44px;
389
-    padding: 0 0 0 10px;
390
-    color: #fff;
391
-    margin: 0 0 10px 0;
392
-    border-radius: 4px 4px 0 0;
393
-  }
376
+
394
 
377
 
395
   .edit_separater {
378
   .edit_separater {
396
     border-top: 1px solid rgb(233, 233, 233);
379
     border-top: 1px solid rgb(233, 233, 233);

+ 7 - 13
src/xt_pages/stock/salesReturnOrder.vue Visa fil

15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
         <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
18
-      <div class="filter-container">
18
+      <div class="cell">
19
         <label class="title"><span class="name">退货时间</span> : </label>
19
         <label class="title"><span class="name">退货时间</span> : </label>
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
         <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
       </div>
27
       </div>
28
 
28
 
29
-      <div class="filter-container" style="margin-top: 10px">
29
+      <div class="cell clearfix" style="margin-top: 10px">
30
         <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
30
         <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
31
         <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
31
         <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
32
 
32
 
33
       </div>
33
       </div>
34
 
34
 
35
-      <el-row :gutter="12" style="margin-top: 10px">
36
         <el-table
35
         <el-table
37
           :data="saleReturnDate"
36
           :data="saleReturnDate"
38
           :class="signAndWeighBoxPatients"
37
           :class="signAndWeighBoxPatients"
80
           </el-table-column>
79
           </el-table-column>
81
 
80
 
82
           <el-table-column label="操作" align="center">
81
           <el-table-column label="操作" align="center">
82
+
83
             <template slot-scope="scope">
83
             <template slot-scope="scope">
84
+              <el-tooltip class="item" effect="dark" content="编辑" placement="top">
84
               <el-button
85
               <el-button
85
                 size="mini"
86
                 size="mini"
86
                 type="primary"
87
                 type="primary"
87
                 icon="el-icon-edit"
88
                 icon="el-icon-edit"
88
                 @click="handleEdit(scope.$index, scope.row)">
89
                 @click="handleEdit(scope.$index, scope.row)">
89
               </el-button>
90
               </el-button>
90
-
91
+              </el-tooltip>
92
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
91
               <el-button
93
               <el-button
92
                 size="mini"
94
                 size="mini"
93
                 type="danger"
95
                 type="danger"
94
                 icon="el-icon-delete"
96
                 icon="el-icon-delete"
95
                 @click="handleDelete(scope.$index, scope.row)">
97
                 @click="handleDelete(scope.$index, scope.row)">
96
               </el-button>
98
               </el-button>
99
+              </el-tooltip>
97
 
100
 
98
             </template>
101
             </template>
99
           </el-table-column>
102
           </el-table-column>
111
           :total="total">
114
           :total="total">
112
         </el-pagination>
115
         </el-pagination>
113
 
116
 
114
-      </el-row>
115
     </div>
117
     </div>
116
   </div>
118
   </div>
117
 
119
 
383
 
385
 
384
   }
386
   }
385
 
387
 
386
-  .title {
387
-    background: #409eff;
388
-    height: 44px;
389
-    line-height: 44px;
390
-    padding: 0 0 0 10px;
391
-    color: #fff;
392
-    margin: 0 0 10px 0;
393
 
388
 
394
-  }
395
 
389
 
396
   .edit_separater {
390
   .edit_separater {
397
     border-top: 1px solid rgb(233, 233, 233);
391
     border-top: 1px solid rgb(233, 233, 233);

+ 118 - 128
src/xt_pages/stock/salesReturnOrderAdd.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
7
+        <el-button size="small" type="primary" @click="submit()" class="filter-item">确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
 
10
 
7
     <div class="app-container">
11
     <div class="app-container">
9
                            :visibility="isVisibility"
13
                            :visibility="isVisibility"
10
                            v-on:dialog-comfirm="comfirm"
14
                            v-on:dialog-comfirm="comfirm"
11
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
15
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
12
-      <div class="filter-container">
13
-        <el-row>
14
-          <el-col :span="8">
15
-            <div>
16
-              <span>退货时间:</span>
17
-              <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" 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>
22
-
23
-
24
-          <el-col :span="8">
25
-            <div>
26
-              <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
27
-                <el-form-item label="厂商:" prop="manufacturer">
28
-                  <el-select v-model="form.manufacturer" placeholder="请选择厂商">
29
-                    <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name"
30
-                               :value="option.id"></el-option>
31
-                  </el-select>
32
-                </el-form-item>
33
-              </el-form>
34
-            </div>
35
-          </el-col>
36
-          <el-col :span="8">
37
-            <div>
38
-              <el-form ref="form" :model="form" label-width="80px">
39
-                <el-form-item label="经销商:">
40
-                  <el-select v-model="form.dealer" placeholder="请选择经销商">
41
-                    <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name"
42
-                               :value="option.id"></el-option>
43
-                  </el-select>
44
-                </el-form-item>
45
-              </el-form>
46
-            </div>
47
-          </el-col>
48
-        </el-row>
49
-        <el-row>
50
-          <el-col>
51
-            <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
52
-              <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
53
-                        max-height="450"
54
-              >
55
-
56
-                <el-table-column label="操作" align="center" min-width="30">
57
-                  <template slot-scope="scope">
58
-                    <el-button
59
-                      size="mini"
60
-                      @click="handleEdit(scope.$index, scope.row)">+
61
-                    </el-button>
62
-                    <el-button
63
-                      size="mini"
64
-                      type="danger"
65
-                      @click="handleDelete(scope.$index, scope.row)">-
66
-                    </el-button>
67
-                  </template>
68
-                </el-table-column>
69
-
70
-                <el-table-column min-width="35" align="center">
71
-
72
-                  <template slot="header" slot-scope="scope">
73
-                    <span>物品类型<span style="color: red">*</span></span>
74
-                  </template>
75
-
76
-                  <template slot-scope="scope">
77
-                    <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
78
-                    <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
79
-
80
-                    <el-form-item style="padding-top: 15px">
81
-                      <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
82
-                                :value="typeName(scope.row.good_type_id)"
83
-                                @focus="showDialog(scope.$index, scope.row)"></el-input>
84
-                    </el-form-item>
85
-
86
-                  </template>
87
-                </el-table-column>
88
-                <el-table-column min-width="35" align="center">
89
-                  <template slot="header" slot-scope="scope">
90
-                    <span>规格名称<span style="color: red">*</span></span>
91
-                  </template>
92
-                  <template slot-scope="scope">
93
-
94
-                    <el-form-item style="padding-top: 15px">
95
-                      <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
96
-                                :value="specificationName(scope.row.good_id)"
97
-                                @focus="showDialog(scope.$index, scope.row)"></el-input>
98
-                    </el-form-item>
99
-
100
-                  </template>
101
-                </el-table-column>
102
-
103
-
104
-                <el-table-column min-width="23" align="center">
105
-                  <template slot="header" slot-scope="scope">
106
-                    <span>退货数量<span style="color: red">*</span></span>
107
-                  </template>
108
-                  <template slot-scope="scope">
109
-                    <!--{{scope.row.warehousing_count}}-->
110
-                    <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
111
-
112
-                    <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count'
113
-                                  style="padding-top: 17px">
114
-                      <el-input type="number" v-model="scope.row.return_count"></el-input>
115
-                    </el-form-item>
116
-                  </template>
117
-                </el-table-column>
118
-
119
-              </el-table>
120
-            </el-form>
121
-          </el-col>
122
-
123
-
124
-          <span class="dialog-footer" style="margin-top: 20px;float:right">
125
-        <el-button @click="back()">取 消</el-button>
126
-        <el-button type="primary" @click="submit()">确 定</el-button>
127
-      </span>
128
-
129
-        </el-row>
16
+      <div class="cell">
17
+        <label class="title"><span class="name">退货时间</span> : </label>
18
+        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
+                        type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
+                        value-format="yyyy-MM-dd"></el-date-picker>
130
       </div>
21
       </div>
131
 
22
 
132
-    </div>
23
+
24
+      <div class="cell clearfix">
25
+        <label class="title"><span class="name">厂商</span> : </label>
26
+        <el-select v-model="form.manufacturer" clearable placeholder="请选择厂商">
27
+          <el-option
28
+            v-for="(option, index) in manufacturer"
29
+            :key="index"
30
+            :label="option.manufacturer_name"
31
+            :value="option.id">
32
+          </el-option>
33
+        </el-select>
34
+      </div>
35
+
36
+      <div class="cell clearfix">
37
+        <label class="title"><span class="name">经销商</span> : </label>
38
+        <el-select v-model="form.dealer" clearable placeholder="请选择经销商">
39
+          <el-option
40
+            v-for="(option, index) in dealer"
41
+            :key="index"
42
+            :label="option.dealer_name"
43
+            :value="option.id">
44
+          </el-option>
45
+        </el-select>
46
+      </div>
47
+
48
+      <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
49
+        <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
50
+                  max-height="450"  :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
51
+        >
52
+
53
+
54
+          <el-table-column min-width="35" align="center">
55
+
56
+            <template slot="header" slot-scope="scope">
57
+              <span>物品类型<span style="color: red">*</span></span>
58
+            </template>
59
+
60
+            <template slot-scope="scope">
61
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id == 0" style="color:#c5c8cf">请输入类型</span>-->
62
+              <!--<span @click="showDialog(scope.$index, scope.row)" v-if="scope.row.good_type_id != 0">{{typeName(scope.row.good_type_id)}}</span>-->
63
+
64
+              <el-form-item style="padding-top: 15px">
65
+                <el-input placeholder="请输入物品类型" v-model="scope.row.good_type_id"
66
+                          :value="typeName(scope.row.good_type_id)"
67
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
68
+              </el-form-item>
69
+
70
+            </template>
71
+          </el-table-column>
72
+          <el-table-column min-width="35" align="center">
73
+            <template slot="header" slot-scope="scope">
74
+              <span>规格名称<span style="color: red">*</span></span>
75
+            </template>
76
+            <template slot-scope="scope">
77
+
78
+              <el-form-item style="padding-top: 15px">
79
+                <el-input placeholder="请输入规格名称" v-model="scope.row.good_id"
80
+                          :value="specificationName(scope.row.good_id)"
81
+                          @focus="showDialog(scope.$index, scope.row)"></el-input>
82
+              </el-form-item>
83
+
84
+            </template>
85
+          </el-table-column>
86
+
87
+
88
+          <el-table-column min-width="23" align="center">
89
+            <template slot="header" slot-scope="scope">
90
+              <span>退货数量<span style="color: red">*</span></span>
91
+            </template>
92
+            <template slot-scope="scope">
93
+              <!--{{scope.row.warehousing_count}}-->
94
+              <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
95
+
96
+              <el-form-item :prop="'recordData.' + scope.$index + '.return_count'" :rules='tableRules.return_count'
97
+                            style="padding-top: 17px">
98
+                <el-input  placeholder="请输入退货数量" type="number" v-model="scope.row.return_count"></el-input>
99
+              </el-form-item>
100
+            </template>
101
+          </el-table-column>
102
+
103
+          <el-table-column label="操作" align="center" min-width="20">
104
+            <template slot-scope="scope">
105
+              <el-tooltip class="item" effect="dark" content="新增" placement="top">
106
+
107
+                <el-button
108
+                  size="mini"
109
+                  type="primary"
110
+                  icon="el-icon-circle-plus-outline"
111
+                  @click="handleEdit(scope.$index, scope.row)">
112
+                </el-button>
113
+              </el-tooltip>
114
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
115
+
116
+                <el-button
117
+                  size="mini"
118
+                  type="danger"
119
+                  icon="el-icon-remove-outline"
120
+                  @click="handleDelete(scope.$index, scope.row)">
121
+                </el-button>
122
+              </el-tooltip>
123
+
124
+            </template>
125
+          </el-table-column>
126
+
127
+
128
+        </el-table>
129
+      </el-form>
130
+
131
+  </div>
133
   </div>
132
   </div>
134
 
133
 
135
 </template>
134
 </template>
394
 
393
 
395
   }
394
   }
396
 
395
 
397
-  .title {
398
-    background: #409eff;
399
-    height: 44px;
400
-    line-height: 44px;
401
-    padding: 0 0 0 10px;
402
-    color: #fff;
403
-    margin: 0 0 10px 0;
404
-  }
405
-
406
   .edit_separater {
396
   .edit_separater {
407
     border-top: 1px solid rgb(233, 233, 233);
397
     border-top: 1px solid rgb(233, 233, 233);
408
     margin-top: 15px;
398
     margin-top: 15px;

+ 1 - 8
src/xt_pages/stock/salesReturnOrderDetail.vue Visa fil

27
 
27
 
28
       <el-row :gutter="12" style="margin-top: 10px">
28
       <el-row :gutter="12" style="margin-top: 10px">
29
         <el-table :data="ReturnInfo.returnInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
29
         <el-table :data="ReturnInfo.returnInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
+                  :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
30
         >
31
         >
31
           <el-table-column min-width="35" align="center">
32
           <el-table-column min-width="35" align="center">
32
             <template slot="header" slot-scope="scope">
33
             <template slot="header" slot-scope="scope">
210
 
211
 
211
   }
212
   }
212
 
213
 
213
-  .title {
214
-    background: #409eff;
215
-    height: 44px;
216
-    line-height: 44px;
217
-    padding: 0 0 0 10px;
218
-    color: #fff;
219
-    margin: 0 0 10px 0;
220
-  }
221
 
214
 
222
   .edit_separater {
215
   .edit_separater {
223
     border-top: 1px solid rgb(233, 233, 233);
216
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 401
src/xt_pages/stock/salesReutrnRecord.vue Visa fil

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

+ 0 - 436
src/xt_pages/stock/stockIn.vue Visa fil

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

+ 2 - 2
src/xt_pages/stock/stockInOrder.vue Visa fil

9
 
9
 
10
     <div class="app-container">
10
     <div class="app-container">
11
     <div class="filter-container">
11
     <div class="filter-container">
12
-      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item" />
12
+      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据日期/单据编码/制单人/供应商" />
13
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
13
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
14
     </div>
14
     </div>
15
 
15
 
376
           }
376
           }
377
         }
377
         }
378
       }, handleEdit: function(index, row) {
378
       }, handleEdit: function(index, row) {
379
-        this.$router.push({ name: 'stockInDetail', query: { id: row.id }})
379
+        this.$router.push({ name: 'stockInDetail', query: { id: row.id, type: this.type }})
380
       }, handleDelete: function(index, row) {
380
       }, handleDelete: function(index, row) {
381
         const ids = []
381
         const ids = []
382
         ids.push(row.id)
382
         ids.push(row.id)

+ 62 - 79
src/xt_pages/stock/stockInOrderAdd.vue Visa fil

3
   <div class="main-contain">
3
   <div class="main-contain">
4
     <div class="position">
4
     <div class="position">
5
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
       <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <div style="float:right;">
7
+      <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
8
+      <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
9
+      </div>
6
     </div>
10
     </div>
7
     <div class="app-container">
11
     <div class="app-container">
8
 
12
 
11
                        v-on:dialog-comfirm="comfirm"
15
                        v-on:dialog-comfirm="comfirm"
12
                        v-on:dialog-cancle="cancle"></stock-in-dialog>
16
                        v-on:dialog-cancle="cancle"></stock-in-dialog>
13
 
17
 
14
-      <div class="filter-container">
15
-
16
-        <el-row>
17
-          <el-col :span="8">
18
-            <el-form ref="form" :model="form" label-width="100px">
19
-              <el-form-item label="入库时间:">
20
-                <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
21
-                                style="width: 196px;"
22
-                                type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
-                                value-format="yyyy-MM-dd"></el-date-picker>
24
-              </el-form-item>
25
-            </el-form>
26
-          </el-col>
27
-
28
-
29
-          <el-col :span="8">
30
-            <div>
31
-              <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
32
-                <el-form-item label="厂商:" prop="manufacturer">
33
-                  <el-select v-model="form.manufacturer" placeholder="请选择厂商">
34
-                    <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name"
35
-                               :value="option.id"></el-option>
36
-                  </el-select>
37
-                </el-form-item>
38
-              </el-form>
39
-            </div>
40
-          </el-col>
41
-          <el-col :span="8">
42
-            <div>
43
-              <el-form ref="form" :model="form" label-width="80px">
44
-                <el-form-item label="经销商:">
45
-                  <el-select v-model="form.dealer" placeholder="请选择经销商">
46
-                    <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name"
47
-                               :value="option.id"></el-option>
48
-                  </el-select>
49
-                </el-form-item>
50
-              </el-form>
51
-            </div>
52
-          </el-col>
53
-        </el-row>
54
-
55
-
56
-        <el-row>
57
-          <el-col>
18
+
19
+      <div class="cell">
20
+        <label class="title"><span class="name">入库时间</span> : </label>
21
+        <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
22
+      </div>
23
+
24
+      <div class="cell clearfix">
25
+        <label class="title"><span class="name">厂商</span> : </label>
26
+        <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
27
+          <el-option
28
+            v-for="(option, index) in manufacturer"
29
+            :key="index"
30
+            :label="option.manufacturer_name"
31
+            :value="option.id">
32
+          </el-option>
33
+        </el-select>
34
+      </div>
35
+
36
+      <div class="cell clearfix">
37
+        <label class="title"><span class="name">经销商</span> : </label>
38
+        <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
39
+          <el-option
40
+            v-for="(option, index) in dealer"
41
+            :key="index"
42
+            :label="option.dealer_name"
43
+            :value="option.id">
44
+          </el-option>
45
+        </el-select>
46
+      </div>
47
+
48
+
58
             <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
49
             <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
59
               <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
50
               <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
60
-                        max-height="450"
51
+                        max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
61
               >
52
               >
62
 
53
 
63
-                <el-table-column label="操作" align="center" min-width="30">
64
-                  <template slot-scope="scope">
65
-                    <el-button
66
-                      size="mini"
67
-                      @click="handleEdit(scope.$index, scope.row)">+
68
-                    </el-button>
69
-                    <el-button
70
-                      size="mini"
71
-                      type="danger"
72
-                      @click="handleDelete(scope.$index, scope.row)">-
73
-                    </el-button>
74
-                  </template>
75
-                </el-table-column>
76
-
77
                 <el-table-column min-width="35" align="center">
54
                 <el-table-column min-width="35" align="center">
78
 
55
 
79
                   <template slot="header" slot-scope="scope">
56
                   <template slot="header" slot-scope="scope">
154
 
131
 
155
                   </template>
132
                   </template>
156
                 </el-table-column>
133
                 </el-table-column>
157
-                <el-table-column label="生产日期" min-width="40" align="center">
134
+                <el-table-column label="生产日期" min-width="43" align="center">
158
                   <template slot-scope="scope">
135
                   <template slot-scope="scope">
159
                     <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
136
                     <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
160
                     <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
137
                     <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
163
 
140
 
164
                   </template>
141
                   </template>
165
                 </el-table-column>
142
                 </el-table-column>
166
-                <el-table-column label="有效日期" min-width="40" align="center">
143
+                <el-table-column label="有效日期" min-width="43" align="center">
167
                   <template slot-scope="scope">
144
                   <template slot-scope="scope">
168
                     <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
145
                     <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
169
                     <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
146
                     <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
177
                     <el-input v-model="scope.row.remark"></el-input>
154
                     <el-input v-model="scope.row.remark"></el-input>
178
                   </template>
155
                   </template>
179
                 </el-table-column>
156
                 </el-table-column>
180
-              </el-table>
181
-            </el-form>
182
-          </el-col>
183
 
157
 
158
+                <el-table-column label="操作" align="center" min-width="40">
159
+                  <template slot-scope="scope">
160
+                    <el-tooltip class="item" effect="dark" content="新增" placement="top">
161
+
162
+                    <el-button
163
+                      size="mini"
164
+                      type="primary"
165
+                      icon="el-icon-circle-plus-outline"
166
+                      @click="handleEdit(scope.$index, scope.row)">
167
+                    </el-button>
168
+                    </el-tooltip>
169
+                    <el-tooltip class="item" effect="dark" content="删除" placement="top">
170
+
171
+                    <el-button
172
+                      size="mini"
173
+                      type="danger"
174
+                      icon="el-icon-remove-outline"
175
+                      @click="handleDelete(scope.$index, scope.row)">
176
+                    </el-button>
177
+                    </el-tooltip>
184
 
178
 
185
-          <span class="dialog-footer" style="margin-top: 20px;float:right">
186
-          <el-button @click="back()">取 消</el-button>
187
-          <el-button type="primary" @click="submit()">确 定</el-button>
188
-        </span>
179
+                  </template>
180
+                </el-table-column>
189
 
181
 
190
-        </el-row>
182
+              </el-table>
183
+            </el-form>
191
 
184
 
192
-      </div>
193
 
185
 
194
     </div>
186
     </div>
195
   </div>
187
   </div>
605
 
597
 
606
   }
598
   }
607
 
599
 
608
-  .title {
609
-    background: #409eff;
610
-    height: 44px;
611
-    line-height: 44px;
612
-    padding: 0 0 0 10px;
613
-    color: #fff;
614
-    margin: 0 0 10px 0;
615
-  }
616
-
617
   .edit_separater {
600
   .edit_separater {
618
     border-top: 1px solid rgb(233, 233, 233);
601
     border-top: 1px solid rgb(233, 233, 233);
619
     margin-top: 15px;
602
     margin-top: 15px;

+ 2 - 8
src/xt_pages/stock/stockInOrderDetail.vue Visa fil

24
 
24
 
25
     <el-row :gutter="12" style="margin-top: 10px">
25
     <el-row :gutter="12" style="margin-top: 10px">
26
       <el-table :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
26
       <el-table :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" style="width: 100%" border
27
+                :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
27
       >
28
       >
28
         <el-table-column min-width="35" align="center">
29
         <el-table-column min-width="35" align="center">
29
           <template slot="header" slot-scope="scope">
30
           <template slot="header" slot-scope="scope">
256
 
257
 
257
   }
258
   }
258
 
259
 
259
-  .title {
260
-    background: #409eff;
261
-    height: 44px;
262
-    line-height: 44px;
263
-    padding: 0 0 0 10px;
264
-    color: #fff;
265
-    margin: 0 0 10px 0;
266
-  }
260
+
267
 
261
 
268
   .edit_separater {
262
   .edit_separater {
269
     border-top: 1px solid rgb(233, 233, 233);
263
     border-top: 1px solid rgb(233, 233, 233);

+ 36 - 51
src/xt_pages/stock/stockInOrderEdit.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
 
10
 
7
-  <div class="app-container sign-and-weigh-box">
11
+  <div class="app-container">
8
 
12
 
9
     <stock-in-dialog :propForm="propForm"
13
     <stock-in-dialog :propForm="propForm"
10
                      :visibility="isVisibility"
14
                      :visibility="isVisibility"
11
                      v-on:dialog-comfirm="comfirm"
15
                      v-on:dialog-comfirm="comfirm"
12
                      v-on:dialog-cancle="cancle"></stock-in-dialog>
16
                      v-on:dialog-cancle="cancle"></stock-in-dialog>
13
 
17
 
14
-    <div class="filter-container">
15
 
18
 
16
-      <el-row>
17
-        <el-col :span="8"><div>
18
-          <span>入库时间:</span>
19
-          <el-date-picker v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
-                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
-                          value-format="yyyy-MM-dd"></el-date-picker>
22
-        </div></el-col>
23
-      </el-row>
19
+
20
+    <div class="cell">
21
+      <label class="title"><span class="name">入库时间</span> : </label>
22
+      <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
24
     </div>
23
     </div>
25
 
24
 
26
-    <el-row>
27
-      <el-col>
25
+
28
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
26
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
29
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
27
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
30
-                    max-height="450"
28
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
31
           >
29
           >
32
 
30
 
33
-            <el-table-column label="操作" align="center" min-width="30">
34
-              <template slot-scope="scope">
35
-                <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
36
-                  <el-button
37
-                    size="small"
38
-                    type="primary"
39
-                    icon="el-icon-edit-outline"
40
-                    @click="handleEdit(scope.$index, scope.row)">
41
-                  </el-button>
42
-                  </el-tooltip>
43
-                  <el-tooltip class="item" effect="dark" content="删除" placement="top">
44
-                    <el-button
45
-                      size="small"
46
-                      type="danger"
47
-                      icon="el-icon-delete"
48
-                      @click="handleDelete(scope.$index, scope.row)">
49
-                    </el-button>
50
-                </el-tooltip>     
51
-              </template>
52
-            </el-table-column>
53
-
54
             <el-table-column min-width="35" align="center">
31
             <el-table-column min-width="35" align="center">
55
 
32
 
56
               <template slot="header" slot-scope="scope">
33
               <template slot="header" slot-scope="scope">
153
                 <el-input  v-model="scope.row.remark"></el-input>
130
                 <el-input  v-model="scope.row.remark"></el-input>
154
               </template>
131
               </template>
155
             </el-table-column>
132
             </el-table-column>
156
-          </el-table>
157
-        </el-form>
158
-      </el-col>
159
 
133
 
134
+            <el-table-column label="操作" align="center" min-width="40">
135
+              <template slot-scope="scope">
136
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
160
 
137
 
161
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
162
-        <el-button @click="back()">取 消</el-button>
163
-        <el-button type="primary" @click="submit()">确 定</el-button>
164
-      </span>
138
+                  <el-button
139
+                    size="mini"
140
+                    type="primary"
141
+                    icon="el-icon-circle-plus-outline"
142
+                    @click="handleEdit(scope.$index, scope.row)">
143
+                  </el-button>
144
+                </el-tooltip>
145
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
165
 
146
 
166
-    </el-row>
147
+                  <el-button
148
+                    size="mini"
149
+                    type="danger"
150
+                    icon="el-icon-remove-outline"
151
+                    @click="handleDelete(scope.$index, scope.row)">
152
+                  </el-button>
153
+                </el-tooltip>
154
+
155
+              </template>
156
+            </el-table-column>
157
+          </el-table>
158
+
159
+
160
+        </el-form>
167
   </div>
161
   </div>
168
   </div>
162
   </div>
169
 
163
 
489
   }
483
   }
490
   }
484
   }
491
 
485
 
492
-  .title {
493
-    background: #409eff;
494
-    height: 44px;
495
-    line-height: 44px;
496
-    padding: 0 0 0 10px;
497
-    color: #fff;
498
-    margin: 0 0 10px 0;
499
-   border-radius: 4px 4px 0 0;
500
-  }
501
 
486
 
502
   .edit_separater {
487
   .edit_separater {
503
     border-top: 1px solid rgb(233, 233, 233);
488
     border-top: 1px solid rgb(233, 233, 233);

+ 0 - 420
src/xt_pages/stock/stockOut.vue Visa fil

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

+ 6 - 0
src/xt_pages/stock/stockOutOrder.vue Visa fil

74
 
74
 
75
         <el-table-column label="操作" align="center">
75
         <el-table-column label="操作" align="center">
76
           <template slot-scope="scope">
76
           <template slot-scope="scope">
77
+            <el-tooltip class="item" effect="dark" content="编辑" placement="top">
78
+
77
             <el-button
79
             <el-button
78
               size="mini"
80
               size="mini"
79
               type="primary"
81
               type="primary"
80
               icon="el-icon-edit"
82
               icon="el-icon-edit"
81
               @click="handleEdit(scope.$index, scope.row)">
83
               @click="handleEdit(scope.$index, scope.row)">
82
             </el-button>
84
             </el-button>
85
+            </el-tooltip>
86
+            <el-tooltip class="item" effect="dark" content="删除" placement="top">
83
 
87
 
84
             <el-button
88
             <el-button
85
               size="mini"
89
               size="mini"
87
               icon="el-icon-delete"
91
               icon="el-icon-delete"
88
               @click="handleDelete(scope.$index, scope.row)">
92
               @click="handleDelete(scope.$index, scope.row)">
89
             </el-button>
93
             </el-button>
94
+            </el-tooltip>
95
+
90
           </template>
96
           </template>
91
         </el-table-column>
97
         </el-table-column>
92
       </el-table>
98
       </el-table>

+ 57 - 75
src/xt_pages/stock/stockOutOrderAdd.vue Visa fil

3
   <div class="main-contain">
3
   <div class="main-contain">
4
     <div class="position">
4
     <div class="position">
5
     <bread-crumb :crumbs='crumbs'></bread-crumb>
5
     <bread-crumb :crumbs='crumbs'></bread-crumb>
6
+      <div style="float:right;">
7
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
8
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
9
+      </div>
6
   </div>
10
   </div>
7
 
11
 
8
   <div class="app-container">
12
   <div class="app-container">
12
                          v-on:dialog-comfirm="comfirm"
16
                          v-on:dialog-comfirm="comfirm"
13
                          v-on:dialog-cancle="cancle"></sales-return-dialog>
17
                          v-on:dialog-cancle="cancle"></sales-return-dialog>
14
 
18
 
15
-    <div class="filter-container">
16
-
17
-      <el-row>
18
-        <el-col :span="8"><div>
19
-          <span>出库时间:</span>
19
+    <div class="cell">
20
+        <label class="title"><span class="name">出库时间</span> : </label>
20
           <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
           <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                           value-format="yyyy-MM-dd"></el-date-picker>
23
                           value-format="yyyy-MM-dd"></el-date-picker>
23
-        </div></el-col>
24
-
25
-
26
-        <el-col :span="8">
27
-          <div>
28
-            <el-form ref="form" :model="form" :rules="ruleForm" label-width="80px">
29
-              <el-form-item label="厂商:" prop="manufacturer">
30
-                <el-select v-model="form.manufacturer" placeholder="请选择厂商">
31
-                  <el-option v-for="(option, index) in manufacturer" :key="index" :label="option.manufacturer_name" :value="option.id"></el-option>
32
-                </el-select>
33
-              </el-form-item>
34
-            </el-form>
35
-          </div>
36
-        </el-col>
37
-        <el-col :span="8">
38
-          <div>
39
-            <el-form ref="form" :model="form" label-width="80px">
40
-              <el-form-item label="经销商:">
41
-                <el-select v-model="form.dealer" placeholder="请选择经销商">
42
-                  <el-option v-for="(option, index) in dealer" :key="index" :label="option.dealer_name" :value="option.id"></el-option>
43
-                </el-select>
44
-              </el-form-item>
45
-            </el-form>
46
-          </div>
47
-        </el-col>
48
-      </el-row>
24
+        </div>
25
+
26
+
27
+    <div class="cell clearfix">
28
+      <label class="title"><span class="name">厂商</span> : </label>
29
+      <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" >
30
+        <el-option
31
+          v-for="(option, index) in manufacturer"
32
+          :key="index"
33
+          :label="option.manufacturer_name"
34
+          :value="option.id">
35
+        </el-option>
36
+      </el-select>
37
+    </div>
49
 
38
 
39
+    <div class="cell clearfix">
40
+      <label class="title"><span class="name">经销商</span> : </label>
41
+      <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
42
+        <el-option
43
+          v-for="(option, index) in dealer"
44
+          :key="index"
45
+          :label="option.dealer_name"
46
+          :value="option.id">
47
+        </el-option>
48
+      </el-select>
50
     </div>
49
     </div>
51
 
50
 
52
-    <el-row>
53
-      <el-col>
51
+
54
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
52
         <el-form  :rules="tableRules" :model="recordInfo" ref="tableForm">
55
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
53
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
56
-                    max-height="450"
54
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
57
           >
55
           >
58
 
56
 
59
-            <el-table-column label="操作" align="center" min-width="30">
60
-              <template slot-scope="scope">
61
-                <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
62
-                  <el-button
63
-                    size="small"
64
-                    type="primary"
65
-                    icon="el-icon-edit-outline"
66
-                    @click="handleEdit(scope.$index, scope.row)">
67
-                  </el-button>
68
-                  </el-tooltip>
69
-                  <el-tooltip class="item" effect="dark" content="删除" placement="top">
70
-                    <el-button
71
-                      size="small"
72
-                      type="danger"
73
-                      icon="el-icon-delete"
74
-                      @click="handleDelete(scope.$index, scope.row)">
75
-                    </el-button>
76
-                </el-tooltip>     
77
-
78
-              </template>
79
-            </el-table-column>
80
-
81
             <el-table-column min-width="35" align="center">
57
             <el-table-column min-width="35" align="center">
82
 
58
 
83
               <template slot="header" slot-scope="scope">
59
               <template slot="header" slot-scope="scope">
115
               <template slot-scope="scope">
91
               <template slot-scope="scope">
116
                 <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
92
                 <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
117
                 <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
93
                 <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price' style="padding-top: 17px">
118
-                  <el-input type="number"  v-model="scope.row.price" ></el-input>
94
+                  <el-input placeholder="请输入单价" type="number"  v-model="scope.row.price" ></el-input>
119
                 </el-form-item>
95
                 </el-form-item>
120
 
96
 
121
 
97
 
128
               </template>
104
               </template>
129
               <template slot-scope="scope">
105
               <template slot-scope="scope">
130
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
106
                 <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count' style="padding-top: 17px">
131
-                  <el-input type="number"  v-model="scope.row.count" ></el-input>
107
+                  <el-input placeholder="请输入出库数量" type="number"  v-model="scope.row.count" ></el-input>
132
                 </el-form-item>
108
                 </el-form-item>
133
               </template>
109
               </template>
134
             </el-table-column>
110
             </el-table-column>
143
                 <el-input  v-model="scope.row.remark"></el-input>
119
                 <el-input  v-model="scope.row.remark"></el-input>
144
               </template>
120
               </template>
145
             </el-table-column>
121
             </el-table-column>
146
-          </el-table>
147
-        </el-form>
148
-      </el-col>
149
 
122
 
123
+            <el-table-column label="操作" align="center" min-width="20">
124
+              <template slot-scope="scope">
125
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
150
 
126
 
151
-      <span  class="dialog-footer" style="margin-top: 20px;float:right">
152
-        <el-button @click="back()">取 消</el-button>
153
-        <el-button type="primary" @click="submit()">确 定</el-button>
154
-      </span>
127
+                  <el-button
128
+                    size="mini"
129
+                    type="primary"
130
+                    icon="el-icon-circle-plus-outline"
131
+                    @click="handleEdit(scope.$index, scope.row)">
132
+                  </el-button>
133
+                </el-tooltip>
134
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
155
 
135
 
156
-    </el-row>
136
+                  <el-button
137
+                    size="mini"
138
+                    type="danger"
139
+                    icon="el-icon-remove-outline"
140
+                    @click="handleDelete(scope.$index, scope.row)">
141
+                  </el-button>
142
+                </el-tooltip>
143
+
144
+              </template>
145
+            </el-table-column>
146
+          </el-table>
147
+        </el-form>
157
   </div>
148
   </div>
158
   </div>
149
   </div>
159
 
150
 
429
   }
420
   }
430
   }
421
   }
431
 
422
 
432
-  .title {
433
-    background: #409eff;
434
-    height: 44px;
435
-    line-height: 44px;
436
-    padding: 0 0 0 10px;
437
-    color: #fff;
438
-    margin: 0 0 10px 0;
439
-  // border-radius: 4px 4px 0 0;
440
-  }
441
 
423
 
442
   .edit_separater {
424
   .edit_separater {
443
     border-top: 1px solid rgb(233, 233, 233);
425
     border-top: 1px solid rgb(233, 233, 233);

+ 1 - 9
src/xt_pages/stock/stockOutOrderDetail.vue Visa fil

27
 
27
 
28
       <el-row :gutter="12" style="margin-top: 10px">
28
       <el-row :gutter="12" style="margin-top: 10px">
29
         <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%"
29
         <el-table :data="warehousingOutInfo.warehousingOutData" :class="signAndWeighBoxPatients" style="width: 100%"
30
-                  border
30
+                  border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
31
         >
31
         >
32
           <el-table-column min-width="35" align="center">
32
           <el-table-column min-width="35" align="center">
33
             <template slot="header" slot-scope="scope">
33
             <template slot="header" slot-scope="scope">
237
 
237
 
238
   }
238
   }
239
 
239
 
240
-  .title {
241
-    background: #409eff;
242
-    height: 44px;
243
-    line-height: 44px;
244
-    padding: 0 0 0 10px;
245
-    color: #fff;
246
-    margin: 0 0 10px 0;
247
-  }
248
 
240
 
249
   .edit_separater {
241
   .edit_separater {
250
     border-top: 1px solid rgb(233, 233, 233);
242
     border-top: 1px solid rgb(233, 233, 233);

+ 31 - 53
src/xt_pages/stock/stockOutOrderEdit.vue Visa fil

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <div style="float:right;">
6
+        <el-button size="small"  @click="back()" class="filter-item"   >取 消</el-button>
7
+        <el-button size="small"  type="primary" @click="submit()" class="filter-item" >确 定</el-button>
8
+      </div>
5
     </div>
9
     </div>
6
 
10
 
7
   <div class="app-container">
11
   <div class="app-container">
11
                      v-on:dialog-comfirm="comfirm"
15
                      v-on:dialog-comfirm="comfirm"
12
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
16
                      v-on:dialog-cancle="cancle"></sales-return-dialog>
13
 
17
 
14
-    <div class="filter-container">
15
-
16
-      <el-row>
17
-        <el-col :span="8">
18
-          <div>
19
-            <span>出库时间:</span>
20
-            <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
+    <div class="cell">
19
+      <label class="title"><span class="name">出库时间</span> : </label>
20
+      <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                             value-format="yyyy-MM-dd"></el-date-picker>
22
                             value-format="yyyy-MM-dd"></el-date-picker>
23
-          </div>
24
-        </el-col>
25
-      </el-row>
26
     </div>
23
     </div>
27
 
24
 
28
-    <el-row>
29
-      <el-col>
30
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
25
         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
31
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
26
           <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
32
-                    max-height="450"
27
+                    max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
33
           >
28
           >
34
 
29
 
35
-            <el-table-column label="操作" align="center" min-width="30">
36
-              <template slot-scope="scope">
37
-                 <el-tooltip class="item" effect="dark" content="编辑" placement="top">  
38
-                  <el-button
39
-                    size="small"
40
-                    type="primary"
41
-                    icon="el-icon-edit-outline"
42
-                    @click="handleEdit(scope.$index, scope.row)">
43
-                  </el-button>
44
-                  </el-tooltip>
45
-                  <el-tooltip class="item" effect="dark" content="删除" placement="top">
46
-                    <el-button
47
-                      size="small"
48
-                      type="danger"
49
-                      icon="el-icon-delete"
50
-                      @click="handleDelete(scope.$index, scope.row)">
51
-                    </el-button>
52
-                </el-tooltip>     
53
-
54
-              </template>
55
-            </el-table-column>
56
-
57
             <el-table-column min-width="35" align="center">
30
             <el-table-column min-width="35" align="center">
58
 
31
 
59
               <template slot="header" slot-scope="scope">
32
               <template slot="header" slot-scope="scope">
119
                 <el-input  v-model="scope.row.remark"></el-input>
92
                 <el-input  v-model="scope.row.remark"></el-input>
120
               </template>
93
               </template>
121
             </el-table-column>
94
             </el-table-column>
122
-          </el-table>
123
-        </el-form>
124
-      </el-col>
95
+            <el-table-column label="操作" align="center" min-width="20">
96
+              <template slot-scope="scope">
97
+                <el-tooltip class="item" effect="dark" content="新增" placement="top">
125
 
98
 
99
+                  <el-button
100
+                    size="mini"
101
+                    type="primary"
102
+                    icon="el-icon-circle-plus-outline"
103
+                    @click="handleEdit(scope.$index, scope.row)">
104
+                  </el-button>
105
+                </el-tooltip>
106
+                <el-tooltip class="item" effect="dark" content="删除" placement="top">
126
 
107
 
127
-      <span class="dialog-footer" style="margin-top: 20px;float:right">
128
-        <el-button @click="back()">取 消</el-button>
129
-        <el-button type="primary" @click="submit()">确 定</el-button>
130
-      </span>
108
+                  <el-button
109
+                    size="mini"
110
+                    type="danger"
111
+                    icon="el-icon-remove-outline"
112
+                    @click="handleDelete(scope.$index, scope.row)">
113
+                  </el-button>
114
+                </el-tooltip>
115
+
116
+              </template>
117
+            </el-table-column>
118
+          </el-table>
119
+        </el-form>
131
 
120
 
132
-    </el-row>
133
   </div>
121
   </div>
134
   </div>
122
   </div>
135
 
123
 
414
 
402
 
415
   }
403
   }
416
 
404
 
417
-  .title {
418
-    background: #409eff;
419
-    height: 44px;
420
-    line-height: 44px;
421
-    padding: 0 0 0 10px;
422
-    color: #fff;
423
-    margin: 0 0 10px 0;
424
-    border-radius: 4px 4px 0 0;
425
-  }
426
-
427
   .edit_separater {
405
   .edit_separater {
428
     border-top: 1px solid rgb(233, 233, 233);
406
     border-top: 1px solid rgb(233, 233, 233);
429
     margin-top: 15px;
407
     margin-top: 15px;

+ 0 - 270
src/xt_pages/stock/stockOutRecord.vue Visa fil

1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleBack">返回</el-button>
7
-    </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-      <label for="" class="title"><span class="name">出库时间:</span></label>
12
-      <el-date-picker v-model="start_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="startTimeChange"></el-date-picker>
15
-      <span class="">-</span>
16
-      <el-date-picker v-model="end_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" @change="endTimeChange"></el-date-picker>
19
-
20
-    </div>
21
-    <el-row :gutter="12">
22
-      <div class="titleTop">出库记录
23
-      </div>
24
-      <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseOutInfo.warehouseOutInfoDate" :class="signAndWeighBoxPatients" border
25
-                v-loading="WarehouseOutInfo.loading"
26
-      >
27
-        <el-table-column
28
-          type="selection"
29
-        >
30
-        </el-table-column>
31
-        <el-table-column label="规格名称" align="center">
32
-          <template slot-scope="scope">
33
-            {{getSpecificationName(scope.row.good_id)}}
34
-          </template>
35
-        </el-table-column>
36
-        <el-table-column label="物品类型" align="center">
37
-          <template slot-scope="scope">
38
-            {{getTypeName(scope.row.good_type_id)}}
39
-          </template>
40
-        </el-table-column>
41
-
42
-        <el-table-column label="出库数量" align="center">
43
-          <template slot-scope="scope">
44
-            <span>{{scope.row.count}}</span>
45
-          </template>
46
-        </el-table-column>
47
-        <el-table-column label="出库单价" align="center">
48
-          <template slot-scope="scope">
49
-            {{scope.row.price}}
50
-
51
-          </template>
52
-        </el-table-column>
53
-        <el-table-column label="出库总价" align="center">
54
-          <template slot-scope="scope">
55
-
56
-            {{calculate(scope.row.price * scope.row.count) }}
57
-
58
-
59
-          </template>
60
-        </el-table-column>
61
-        <el-table-column label="" align="center">
62
-          <template slot-scope="scope">
63
-            {{scope.row.WarehouseOut.warehouse_out_time | parseTime("{y}-{m}-{d}")}}
64
-
65
-          </template>
66
-        </el-table-column>
67
-        <el-table-column label="出库单号" align="center">
68
-          <template slot-scope="scope">
69
-            {{scope.row.WarehouseOut.warehouse_out_order_number}}
70
-          </template>
71
-        </el-table-column>
72
-
73
-      </el-table>
74
-
75
-      <el-pagination
76
-        @size-change="handleSizeChange"
77
-        @current-change="handleCurrentChange"
78
-        :page-sizes="[7]"
79
-        :page-size="7"
80
-        background
81
-        align="right"
82
-        style="margin-top:20px;"
83
-        layout="total, sizes, prev, pager, next, jumper"
84
-        :total="total">
85
-      </el-pagination>
86
-    </el-row>
87
-  </div>
88
-  </div>
89
-
90
-</template>
91
-
92
-<script>
93
-  import {uParseTime} from "@/utils/tools";
94
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
95
-  import {
96
-    getAllStockOutList,
97
-    GetAllGoodInfo,
98
-    GetAllGoodType,
99
-  } from "@/api/stock";
100
-
101
-  export default {
102
-    name: "stockIn",
103
-    created() {
104
-      var year = new Date().getFullYear();
105
-      var month = new Date().getMonth() + 1;
106
-      var day = new Date().getDate();
107
-      if (parseInt(month) < 10) {
108
-        month = "0" + month;
109
-      }
110
-      if (parseInt(day) < 10) {
111
-        day = "0" + day;
112
-      }
113
-      let endTime = year + '-' + month + '-' + day;
114
-      this.end_time = endTime
115
-
116
-
117
-      var year = new Date().getFullYear();
118
-      var month = new Date().getMonth();
119
-      var day = new Date().getDate();
120
-      if (parseInt(month) < 10) {
121
-        month = "0" + month;
122
-      }
123
-      if (parseInt(day) < 10) {
124
-        day = "0" + day;
125
-      }
126
-      let startTime = year + '-' + month + '-' + day;
127
-      this.start_time = startTime
128
-
129
-      this.GetWarehouse()
130
-      this.GetAllGoodInfo()
131
-      this.GetAllGoodType()
132
-
133
-
134
-    },
135
-    components:{
136
-      BreadCrumb
137
-    },
138
-    data() {
139
-      return {
140
-        total:0,
141
-        multipleSelection: [],
142
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
143
-        start_time: '',
144
-        end_time: '',
145
-        goodType: [],
146
-        goodInfo: [],
147
-        WarehouseOutInfo: {
148
-          loading: false,
149
-          warehouseOutInfoDate: [],
150
-        }
151
-      };
152
-    },
153
-    methods: {
154
-      GetWarehouse: function () {
155
-        let Params = {
156
-          page: this.page,
157
-          limit: this.limit,
158
-          start_time: this.start_time,
159
-          end_time: this.end_time
160
-        }
161
-        this.WarehouseOutInfo.warehouseOutInfoDate = []
162
-        getAllStockOutList(Params).then(response => {
163
-          if (response.data.state == 0) {
164
-            this.WarehouseOutInfo.loading = false
165
-            this.$message.error(response.data.msg);
166
-            return false;
167
-          } else {
168
-            this.WarehouseOutInfo.loading = false
169
-            this.total = response.data.data.total
170
-            for (let i = 0; i < response.data.data.list.length; i++) {
171
-              this.WarehouseOutInfo.warehouseOutInfoDate.push(response.data.data.list[i])
172
-            }
173
-          }
174
-        });
175
-      }, getSpecificationName: function (id) {
176
-        let name = ''
177
-        for (let i = 0; i < this.goodInfo.length; i++) {
178
-          if (this.goodInfo[i].id == id) {
179
-            name = this.goodInfo[i].specification_name
180
-          }
181
-        }
182
-        return name
183
-      }, getTypeName: function (id) {
184
-        let name = ''
185
-        for (let i = 0; i < this.goodType.length; i++) {
186
-          if (this.goodType[i].id == id) {
187
-            name = this.goodType[i].type_name
188
-          }
189
-        }
190
-        return name
191
-      }, GetAllGoodType: function () {
192
-        GetAllGoodType().then(response => {
193
-          if (response.data.state == 0) {
194
-            this.$message.error(response.data.msg);
195
-            return false;
196
-          } else {
197
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
198
-              this.goodType.push(response.data.data.goodType[i])
199
-            }
200
-          }
201
-        });
202
-      }, GetAllGoodInfo: function () {
203
-        GetAllGoodInfo().then(response => {
204
-          if (response.data.state == 0) {
205
-            this.$message.error(response.data.msg);
206
-            return false;
207
-          } else {
208
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
209
-              this.goodInfo.push(response.data.data.goodInfo[i])
210
-            }
211
-          }
212
-        });
213
-      }, handleBack: function () {
214
-        this.$router.go(-1)
215
-      } ,startTimeChange(val) {
216
-        this.GetWarehouse();
217
-      }, endTimeChange(val) {
218
-        this.GetWarehouse();
219
-      },calculate:function (val) {
220
-        return Math.round(parseFloat(val)*100)/100
221
-      },
222
-    }
223
-  };
224
-</script>
225
-
226
-<style rel="stylesheet/css" lang="scss" scoped>
227
-  .information {
228
-    border: 1px #dcdfe6 solid;
229
-    padding: 30px 20px 30px 20px;
230
-
231
-    .border {
232
-      border-bottom: 1px #dcdfe6 solid;
233
-      margin: 0px 0 20px 0;
234
-    }
235
-  }
236
-
237
-  .titleTop {
238
-    background: #409eff;
239
-    height: 44px;
240
-    line-height: 44px;
241
-    padding: 0 0 0 10px;
242
-    color: #fff;
243
-    margin: 0 0 10px 0;
244
-    // border-radius: 4px 4px 0 0;
245
-        font-size: 14px;
246
-  }
247
-
248
-  .edit_separater {
249
-    border-top: 1px solid rgb(233, 233, 233);
250
-    margin-top: 15px;
251
-    margin-bottom: 15px;
252
-  }
253
-
254
-</style>
255
-
256
-<style>
257
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
258
-    font-size: 12px;
259
-  }
260
-
261
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
262
-    background: #6fb5fa;
263
-  }
264
-
265
-  .count {
266
-    color: #bd2c00;
267
-
268
-  }
269
-
270
-</style>

+ 8 - 8
src/xt_pages/stock/stockQuery.vue Visa fil

1
 <template>
1
 <template>
2
 <div class="main-contain">
2
 <div class="main-contain">
3
   <div class="position">
3
   <div class="position">
4
-    <bread-crumb></bread-crumb>
4
+    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
 
5
 
6
   </div>
6
   </div>
7
-  <div class="app-container sign-and-weigh-box">
8
-    <el-row :gutter="12">
9
-      <div class="title">库存列表
10
-      </div>
7
+  <div class="app-container ">
11
       <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}"  :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" border
8
       <el-table :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}"  :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" border
12
                 v-loading="WarehouseInfo.loading"
9
                 v-loading="WarehouseInfo.loading"
13
       >
10
       >
75
         layout="total, sizes, prev, pager, next, jumper"
72
         layout="total, sizes, prev, pager, next, jumper"
76
         :total="total">
73
         :total="total">
77
       </el-pagination>
74
       </el-pagination>
78
-
79
-    </el-row>
80
   </div>
75
   </div>
81
   </div>
76
   </div>
82
-  
77
+
83
 </template>
78
 </template>
84
 
79
 
85
 <script>
80
 <script>
103
     },
98
     },
104
     data() {
99
     data() {
105
       return {
100
       return {
101
+        crumbs: [
102
+          { path: false, name: '库存管理' },
103
+          { path: '/stock/query', name: '库存查询' },
104
+        ],
105
+
106
         total: 0,
106
         total: 0,
107
         multipleSelection: [],
107
         multipleSelection: [],
108
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
108
         signAndWeighBoxPatients: 'sign-and-weigh-box-patients',

+ 0 - 304
src/xt_pages/stock/warehouseRecord.vue Visa fil

1
-<template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb></bread-crumb>
5
-    <el-row style="float:right;">
6
-        <el-button size="small" icon="el-icon-refresh" @click="handleBack" type="primary">返回</el-button>
7
-      </el-row>
8
-  </div>
9
-  <div class="app-container sign-and-weigh-box">
10
-    <div class="cell">
11
-      <label  class="title"><span class="name">入库时间:</span></label>
12
-      <el-date-picker v-model="start_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="startTimeChange"></el-date-picker>
15
-      <span class="">-</span>
16
-      <el-date-picker v-model="end_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" @change="endTimeChange"></el-date-picker>
19
-
20
-    </div>
21
-    <el-row :gutter="12">
22
-      <div class="titleTop">入库记录
23
-      </div>
24
-      <el-table  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" :data="WarehouseInfo.warehouseInfoDate" :class="signAndWeighBoxPatients" border
25
-                v-loading="WarehouseInfo.loading"
26
-      >
27
-        <el-table-column
28
-          type="selection"
29
-        >
30
-        </el-table-column>
31
-        <el-table-column label="规格名称" align="center">
32
-          <template slot-scope="scope">
33
-            {{getSpecificationName(scope.row.good_id)}}
34
-          </template>
35
-        </el-table-column>
36
-        <el-table-column label="物品类型" align="center">
37
-          <template slot-scope="scope">
38
-            {{getTypeName(scope.row.good_type_id)}}
39
-          </template>
40
-        </el-table-column>
41
-
42
-        <el-table-column label="入库数量" align="center">
43
-          <template slot-scope="scope">
44
-            <span>{{scope.row.warehousing_count}}</span>
45
-          </template>
46
-        </el-table-column>
47
-        <el-table-column label="入库单价" align="center">
48
-          <template slot-scope="scope">
49
-            {{scope.row.price}}
50
-
51
-          </template>
52
-        </el-table-column>
53
-        <el-table-column label="入库总价" align="center">
54
-          <template slot-scope="scope">
55
-            {{calculate(scope.row.price * scope.row.warehousing_count)}}
56
-
57
-          </template>
58
-        </el-table-column>
59
-        <el-table-column label="入库时间" align="center">
60
-          <template slot-scope="scope">
61
-            {{scope.row.Warehousing.warehousing_time | parseTime("{y}-{m}-{d}")}}
62
-
63
-          </template>
64
-        </el-table-column>
65
-        <el-table-column label="入库单号" align="center">
66
-          <template slot-scope="scope">
67
-            {{scope.row.Warehousing.warehousing_order}}
68
-          </template>
69
-        </el-table-column>
70
-
71
-        <el-table-column label="操作" align="center">
72
-          <template slot-scope="scope">
73
-           <el-tooltip class="item" effect="dark" content="删除" placement="top">
74
-            <el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteRows(scope.row)"></el-button>
75
-           </el-tooltip>
76
-          </template>
77
-        </el-table-column>
78
-
79
-      </el-table>
80
-
81
-
82
-      <el-pagination
83
-        :page-sizes="[7]"
84
-        :page-size="7"
85
-        background
86
-        align="right"
87
-        style="margin-top:20px;"
88
-        layout="total, sizes, prev, pager, next, jumper"
89
-        :total="total">
90
-      </el-pagination>
91
-
92
-    </el-row>
93
-  </div>
94
-</div>
95
-</template>
96
-
97
-<script>
98
-  import {uParseTime} from "@/utils/tools";
99
-  import {deleteStockInRecord, GetAllGoodInfo, GetAllGoodType, getAllWarehouseInfo} from "@/api/stock";
100
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
101
-  
102
-  export default {
103
-    name: "stockIn",
104
-    created() {
105
-      var year = new Date().getFullYear();
106
-      var month = new Date().getMonth() + 1;
107
-      var day = new Date().getDate();
108
-      if (parseInt(month) < 10) {
109
-        month = "0" + month;
110
-      }
111
-      if (parseInt(day) < 10) {
112
-        day = "0" + day;
113
-      }
114
-      let endTime = year + '-' + month + '-' + day;
115
-      this.end_time = endTime
116
-
117
-
118
-      var year = new Date().getFullYear();
119
-      var month = new Date().getMonth();
120
-      var day = new Date().getDate();
121
-      if (parseInt(month) < 10) {
122
-        month = "0" + month;
123
-      }
124
-      if (parseInt(day) < 10) {
125
-        day = "0" + day;
126
-      }
127
-      let startTime = year + '-' + month + '-' + day;
128
-      this.start_time = startTime
129
-
130
-      this.GetWarehouse()
131
-      this.GetAllGoodInfo()
132
-      this.GetAllGoodType()
133
-    },
134
-    components:{
135
-      BreadCrumb
136
-    },
137
-    data() {
138
-      return {
139
-        total: 0,
140
-        multipleSelection: [],
141
-        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
142
-        start_time: '',
143
-        end_time: '',
144
-        page: 1,
145
-        limit: 7,
146
-        goodType: [],
147
-        goodInfo: [],
148
-        WarehouseInfo: {
149
-          loading: false,
150
-          warehouseInfoDate: [],
151
-        }
152
-      };
153
-    },
154
-    methods: {
155
-      GetWarehouse: function () {
156
-        let Params = {
157
-          page: this.page,
158
-          limit: this.limit,
159
-          start_time: this.start_time,
160
-          end_time: this.end_time
161
-        }
162
-        this.WarehouseInfo.warehouseInfoDate = []
163
-        getAllWarehouseInfo(Params).then(response => {
164
-          if (response.data.state == 0) {
165
-            this.WarehouseInfo.loading = false
166
-            this.$message.error(response.data.msg);
167
-            return false;
168
-          } else {
169
-            this.WarehouseInfo.loading = false
170
-            this.total = response.data.data.total
171
-            for (let i = 0; i < response.data.data.list.length; i++) {
172
-              this.WarehouseInfo.warehouseInfoDate.push(response.data.data.list[i])
173
-            }
174
-          }
175
-        });
176
-      }, getSpecificationName: function (id) {
177
-        let name = ''
178
-        for (let i = 0; i < this.goodInfo.length; i++) {
179
-          if (this.goodInfo[i].id == id) {
180
-            name = this.goodInfo[i].specification_name
181
-          }
182
-        }
183
-        return name
184
-      }, getTypeName: function (id) {
185
-        let name = ''
186
-        for (let i = 0; i < this.goodType.length; i++) {
187
-          if (this.goodType[i].id == id) {
188
-            name = this.goodType[i].type_name
189
-          }
190
-        }
191
-        return name
192
-      }, GetAllGoodType: function () {
193
-        GetAllGoodType().then(response => {
194
-          if (response.data.state == 0) {
195
-            this.$message.error(response.data.msg);
196
-            return false;
197
-          } else {
198
-            for (let i = 0; i < response.data.data.goodType.length; i++) {
199
-              this.goodType.push(response.data.data.goodType[i])
200
-            }
201
-          }
202
-        });
203
-      }, GetAllGoodInfo: function () {
204
-        GetAllGoodInfo().then(response => {
205
-          if (response.data.state == 0) {
206
-            this.$message.error(response.data.msg);
207
-            return false;
208
-          } else {
209
-            for (let i = 0; i < response.data.data.goodInfo.length; i++) {
210
-              this.goodInfo.push(response.data.data.goodInfo[i])
211
-            }
212
-          }
213
-        });
214
-      }, handleBack: function () {
215
-        this.$router.go(-1)
216
-      }, handleSizeChange(val) {
217
-        this.limit = val;
218
-        this.GetWarehouse();
219
-      }, handleCurrentChange(val) {
220
-        this.page = val;
221
-        this.GetWarehouse();
222
-      }, calculate: function (val) {
223
-        return Math.round(parseFloat(val) * 100) / 100
224
-      }, startTimeChange: function () {
225
-        this.GetWarehouse()
226
-      }, endTimeChange: function () {
227
-        this.GetWarehouse()
228
-
229
-      },deleteRows:function (row) {
230
-        let params = {
231
-          record_id: row.id,
232
-          good_id: row.good_id,
233
-          order_number: row.Warehousing.warehousing_order,
234
-        }
235
-        deleteStockInRecord(params).then(response => {
236
-          if (response.data.state == 0) {
237
-            this.$message.error(response.data.msg);
238
-            return false;
239
-          } else {
240
-            this.$message.success(response.data.data.msg);
241
-
242
-            for (let i = 0; i < this.WarehouseInfo.warehouseInfoDate.length; i++){
243
-              console.log(this.WarehouseInfo.warehouseInfoDate[i].id)
244
-              console.log(row.id)
245
-
246
-              if (this.WarehouseInfo.warehouseInfoDate[i].id == row.id){
247
-                this.WarehouseInfo.warehouseInfoDate.splice(i,1)
248
-              }
249
-            }
250
-
251
-          }
252
-        });
253
-
254
-      }
255
-    }
256
-  };
257
-</script>
258
-
259
-<style rel="stylesheet/css" lang="scss" scoped>
260
-  .information {
261
-    border: 1px #dcdfe6 solid;
262
-    padding: 30px 20px 30px 20px;
263
-
264
-  .border {
265
-    border-bottom: 1px #dcdfe6 solid;
266
-    margin: 0px 0 20px 0;
267
-  }
268
-
269
-  }
270
-
271
-  .titleTop {
272
-    background: #409eff;
273
-    height: 44px;
274
-    line-height: 44px;
275
-    padding: 0 0 0 10px;
276
-    color: #fff;
277
-    margin: 0 0 10px 0;
278
-  //  border-radius: 4 px 4 px 0 0;
279
-      font-size: 14px;
280
-  }
281
-
282
-  .edit_separater {
283
-    border-top: 1px solid rgb(233, 233, 233);
284
-    margin-top: 15px;
285
-    margin-bottom: 15px;
286
-  }
287
-
288
-</style>
289
-
290
-<style>
291
-  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
292
-    font-size: 12px;
293
-  }
294
-
295
-  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
296
-    background: #6fb5fa;
297
-  }
298
-
299
-  .count {
300
-    color: #bd2c00;
301
-
302
-  }
303
-
304
-</style>

+ 13 - 13
src/xt_permission.js Visa fil

10
 
10
 
11
 router.beforeEach((to, from, next) => {
11
 router.beforeEach((to, from, next) => {
12
   // 线上注释
12
   // 线上注释
13
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-    store.dispatch('VerifyConfigList', []).then(() => {
15
-      next()
16
-    })
17
-  }
18
-  if (store.getters.permission_routers === undefined) {
19
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-      next()
21
-    })
22
-  } else {
23
-    next()
24
-  }
25
-  return
13
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+  //   store.dispatch('VerifyConfigList', []).then(() => {
15
+  //     next()
16
+  //   })
17
+  // }
18
+  // if (store.getters.permission_routers === undefined) {
19
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+  //     next()
21
+  //   })
22
+  // } else {
23
+  //   next()
24
+  // }
25
+  // return
26
   // 线上注释
26
   // 线上注释
27
 
27
 
28
   NProgress.start()
28
   NProgress.start()