瀏覽代碼

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 3 年之前
父節點
當前提交
b4a64b82f3

+ 269 - 175
src/xt_pages/outpatientCharges/components/prescriptionTable.vue 查看文件

@@ -1,238 +1,317 @@
1 1
 <template>
2 2
   <div class="prescriptionTable">
3
-    <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 99%;"
4
-              :row-style="{ color: '#303133' }"
5
-              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
-      <el-table-column fixed align="center" type="index" width="40" label="序号"></el-table-column>
7
-      <el-table-column fixed align="center" prop="name" label="名称">
8
-        <template slot-scope="scope"><span :title='scope.row.drug_name'>{{ scope.row.drug_name }}</span></template>
9
-      </el-table-column>
10
-
11
-      <el-table-column align="center" prop="name" width="90" label="单次用量">
3
+    <el-table
4
+      v-if="prescription.type == 1"
5
+      :data="prescription.advices"
6
+      border
7
+      style="width: 99%"
8
+      :row-style="changColor"
9
+      :row-class-name="tableRowClassName"
10
+      :header-cell-style="{
11
+        color: '#606266',
12
+      }"
13
+      highlight-current-row
14
+    >
15
+      <el-table-column
16
+        fixed
17
+        align="center"
18
+        type="index"
19
+        width="40"
20
+        label="序号"
21
+      ></el-table-column>
22
+      <el-table-column fixed align="center" prop="name" width="200" label="名称">
23
+        <template slot-scope="scope"
24
+          ><span :title="scope.row.drug_name">{{
25
+            scope.row.drug_name
26
+          }}</span></template
27
+        >
28
+      </el-table-column>
29
+
30
+      <el-table-column align="center" prop="name" width="70" label="单次用量">
12 31
         <template slot-scope="scope">
13
-            <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
14
-            <div>{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</div>
32
+          <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
33
+          <div>
34
+            {{ scope.row.single_dose }}&nbsp;&nbsp;{{
35
+              scope.row.single_dose_unit
36
+            }}
37
+          </div>
15 38
         </template>
16 39
       </el-table-column>
17
-      <el-table-column align="center" prop="name" width="100" label="用法">
40
+      <el-table-column align="center" prop="name" width="80" label="用法">
18 41
         <template slot-scope="scope">
19 42
           <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
20
-          <div> {{scope.row.delivery_way}}</div>
21
-
43
+          <div>{{ scope.row.delivery_way }}</div>
22 44
         </template>
23 45
       </el-table-column>
24
-      <el-table-column align="center" prop="name" width="100" label="频率">
46
+      <el-table-column align="center" prop="name" width="80" label="频率">
25 47
         <template slot-scope="scope">
26
-          <div> {{scope.row.execution_frequency}}</div>
48
+          <div>{{ scope.row.execution_frequency }}</div>
27 49
 
28 50
           <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
29 51
         </template>
30 52
       </el-table-column>
31 53
 
32
-      <el-table-column align="center" prop="day" width="50" label="天数">
33
-        <template slot-scope="scope">{{scope.row.day}}天</template>
54
+      <el-table-column align="center" prop="day" width="80" label="天数">
55
+        <template slot-scope="scope">{{ scope.row.day }}天</template>
34 56
       </el-table-column>
35 57
 
36
-      <el-table-column align="center" prop="name" width="100" label="总量">
58
+      <el-table-column align="center" prop="name" width="80" label="总量">
37 59
         <template slot-scope="scope">
38
-            <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
39
-            <div>{{scope.row.prescribing_number}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</div>
60
+          <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
61
+          <div>
62
+            {{ scope.row.prescribing_number }}&nbsp;&nbsp;{{
63
+              scope.row.prescribing_number_unit
64
+            }}
65
+          </div>
40 66
         </template>
41 67
       </el-table-column>
42
-      <el-table-column align="center" prop="name" width="60" label="单价">
68
+      <el-table-column align="center" prop="name" width="80" label="单价">
43 69
         <template slot-scope="scope">
44
-          <div> {{scope.row.retail_price}}元</div>
70
+          <div>{{ scope.row.retail_price }}元</div>
45 71
 
46 72
           <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
47 73
         </template>
48 74
       </el-table-column>
49 75
 
50
-      <el-table-column align="center" prop="name" width="60" label="执行状态">
76
+      <el-table-column align="center" prop="name" width="80" label="执行状态">
51 77
         <template slot-scope="scope">
52
-          <div> {{scope.row.execution_state == 1 ? '已执行':'未执行'}}</div>
78
+          <div>{{ scope.row.execution_state == 1 ? "已执行" : "未执行" }}</div>
53 79
         </template>
54 80
       </el-table-column>
55 81
 
56
-
57
-      <el-table-column align="center" prop="name" width="120" label="医保编码">
82
+      <el-table-column align="center" prop="name" width="320" label="医保编码">
58 83
         <template slot-scope="scope">
59
-          <div> {{scope.row.code}}</div>
84
+          <div>{{ scope.row.code }}</div>
60 85
         </template>
61 86
       </el-table-column>
62 87
 
63
-
64 88
       <el-table-column align="center" prop="name" width="80" label="规格/型号">
65 89
         <template slot-scope="scope">
66
-          <div> {{scope.row.spec}}</div>
90
+          <div>{{ scope.row.spec }}</div>
67 91
         </template>
68 92
       </el-table-column>
69 93
 
70 94
       <el-table-column align="center" prop="name" width="60" label="金额">
71 95
         <template slot-scope="scope">
72
-          <div> {{scope.row.det_item_fee_sumamt}}</div>
96
+          <div>{{ scope.row.det_item_fee_sumamt }}</div>
73 97
         </template>
74 98
       </el-table-column>
75 99
 
76
-
77 100
       <el-table-column align="center" prop="name" width="120" label="生产厂家">
78 101
         <template slot-scope="scope">
79
-          <div> {{getName(scope.row.name_id)}}</div>
102
+          <div>{{ getName(scope.row.name_id) }}</div>
80 103
         </template>
81 104
       </el-table-column>
82 105
 
83
-
84
-
85 106
       <el-table-column align="center" prop="name" width="90" label="全自费金额">
86 107
         <template slot-scope="scope">
87
-          <div> {{scope.row.fulamt_ownpay_amt}}元</div>
108
+          <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
88 109
         </template>
89 110
       </el-table-column>
90 111
 
91
-
92
-
93 112
       <el-table-column align="center" prop="name" width="90" label="超限价金额">
94 113
         <template slot-scope="scope">
95
-          <div> {{scope.row.overlmt_amt}}元</div>
114
+          <div>{{ scope.row.overlmt_amt }}元</div>
96 115
         </template>
97 116
       </el-table-column>
98 117
 
99
-
100
-      <el-table-column align="center" prop="name" width="90" label="先行自付金额">
118
+      <el-table-column
119
+        align="center"
120
+        prop="name"
121
+        width="90"
122
+        label="先行自付金额"
123
+      >
101 124
         <template slot-scope="scope">
102
-          <div> {{scope.row.preselfpay_amt}}元</div>
125
+          <div>{{ scope.row.preselfpay_amt }}元</div>
103 126
         </template>
104 127
       </el-table-column>
105 128
 
106
-
107
-      <el-table-column align="center" prop="name" width="90" label="符合正常范围金额">
129
+      <el-table-column
130
+        align="center"
131
+        prop="name"
132
+        width="90"
133
+        label="符合正常范围金额"
134
+      >
108 135
         <template slot-scope="scope">
109
-          <div> {{scope.row.inscp_scp_amt}}元</div>
136
+          <div>{{ scope.row.inscp_scp_amt }}元</div>
110 137
         </template>
111 138
       </el-table-column>
112 139
 
113
-
114
-
115
-
116
-
117
-
118
-
119 140
       <el-table-column align="center" prop="name" width="50" label="备注">
120 141
         <template slot-scope="scope">
121 142
           <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
122
-          <div> {{scope.row.remark}}</div>
143
+          <div>{{ scope.row.remark }}</div>
123 144
         </template>
124 145
       </el-table-column>
125 146
     </el-table>
126
-    <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
127
-              :row-style="{ color: '#303133' }"
128
-              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
129
-      <el-table-column fixed align="center" type="index" width="40" label="序号"></el-table-column>
147
+    <el-table
148
+      v-if="prescription.type == 2"
149
+      :data="prescription.project"
150
+      border
151
+      style="width: 99%"
152
+      :row-style="{ color: '#303133' }"
153
+      :header-cell-style="{
154
+        backgroundColor: 'rgb(245, 247, 250)',
155
+        color: '#606266',
156
+      }"
157
+      highlight-current-row
158
+    >
159
+      <el-table-column
160
+        fixed
161
+        align="center"
162
+        type="index"
163
+        width="40"
164
+        label="序号"
165
+      ></el-table-column>
130 166
       <el-table-column fixed align="center" prop="project_name" label="名称">
131 167
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
132 168
       </el-table-column>
133
-      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
134
-        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
135
-      </el-table-column>
136
-      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
137
-        <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
138
-
139
-      </el-table-column>
140
-      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
141
-        <template slot-scope="scope">{{scope.row.delivery_way}}</template>
142
-      </el-table-column>
143
-      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
144
-        <template slot-scope="scope">{{scope.row.execution_frequency}}</template>
145
-      </el-table-column>
146
-      <el-table-column align="center" prop="number_days" width="50" label="天数">
147
-        <template slot-scope="scope">{{scope.row.number_days}}天</template>
148
-
169
+      <el-table-column
170
+        align="center"
171
+        prop="statistical_classification"
172
+        width="100"
173
+        label="组"
174
+      >
175
+        <template slot-scope="scope">{{
176
+          scope.row.type == 2
177
+            ? getGroup(scope.row.statistical_classification)
178
+            : "耗材"
179
+        }}</template>
180
+      </el-table-column>
181
+      <el-table-column
182
+        align="center"
183
+        prop="single_dose"
184
+        width="80"
185
+        label="单次用量"
186
+      >
187
+        <template slot-scope="scope"
188
+          >{{ scope.row.single_dose }}{{ scope.row.unit }}</template
189
+        >
190
+      </el-table-column>
191
+      <el-table-column
192
+        align="center"
193
+        prop="delivery_way"
194
+        width="80"
195
+        label="用法"
196
+      >
197
+        <template slot-scope="scope">{{ scope.row.delivery_way }}</template>
198
+      </el-table-column>
199
+      <el-table-column
200
+        align="center"
201
+        prop="execution_frequency"
202
+        width="80"
203
+        label="频率"
204
+      >
205
+        <template slot-scope="scope">{{
206
+          scope.row.execution_frequency
207
+        }}</template>
208
+      </el-table-column>
209
+      <el-table-column
210
+        align="center"
211
+        prop="number_days"
212
+        width="50"
213
+        label="天数"
214
+      >
215
+        <template slot-scope="scope">{{ scope.row.number_days }}天</template>
149 216
       </el-table-column>
150 217
       <el-table-column align="center" prop="total" width="50" label="总量">
151 218
         <template slot-scope="scope">
152
-          <div>{{scope.row.total}} {{scope.row.unit}}</div>
219
+          <div>{{ scope.row.total }} {{ scope.row.unit }}</div>
153 220
         </template>
154 221
       </el-table-column>
155 222
       <el-table-column align="center" prop="name" width="50" label="单价">
156
-        <template slot-scope="scope">{{scope.row.price}}元</template>
223
+        <template slot-scope="scope">{{ scope.row.price }}元</template>
157 224
       </el-table-column>
158 225
 
159 226
       <el-table-column align="center" prop="name" width="60" label="执行状态">
160 227
         <template slot-scope="scope">
161
-          <div> {{scope.row.execution_state == 1 ? '已执行':'未执行'}}</div>
228
+          <div>{{ scope.row.execution_state == 1 ? "已执行" : "未执行" }}</div>
162 229
         </template>
163 230
       </el-table-column>
164 231
 
165
-
166 232
       <el-table-column align="center" prop="name" width="120" label="医保编码">
167 233
         <template slot-scope="scope">
168
-          <div> {{scope.row.medical_code}}</div>
234
+          <div>{{ scope.row.medical_code }}</div>
169 235
         </template>
170 236
       </el-table-column>
171 237
 
172
-
173 238
       <el-table-column align="center" prop="name" width="80" label="规格/型号">
174 239
         <template slot-scope="scope">
175
-          <div> {{scope.row.spec}}</div>
240
+          <div>{{ scope.row.spec }}</div>
176 241
         </template>
177 242
       </el-table-column>
178 243
 
179 244
       <el-table-column align="center" prop="name" width="60" label="金额">
180 245
         <template slot-scope="scope">
181
-          <div> {{scope.row.det_item_fee_sumamt}}元</div>
246
+          <div>{{ scope.row.det_item_fee_sumamt }}元</div>
182 247
         </template>
183 248
       </el-table-column>
184 249
 
185
-
186 250
       <el-table-column align="center" prop="name" width="120" label="生产厂家">
187 251
         <template slot-scope="scope">
188
-          <div> {{getName(scope.row.name_id)}}</div>
252
+          <div>{{ getName(scope.row.name_id) }}</div>
189 253
         </template>
190 254
       </el-table-column>
191 255
 
192
-
193
-
194 256
       <el-table-column align="center" prop="name" width="90" label="全自费金额">
195 257
         <template slot-scope="scope">
196
-          <div> {{scope.row.fulamt_ownpay_amt}}元</div>
258
+          <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
197 259
         </template>
198 260
       </el-table-column>
199 261
 
200
-
201
-
202 262
       <el-table-column align="center" prop="name" width="90" label="超限价金额">
203 263
         <template slot-scope="scope">
204
-          <div> {{scope.row.overlmt_amt}}元</div>
264
+          <div>{{ scope.row.overlmt_amt }}元</div>
205 265
         </template>
206 266
       </el-table-column>
207 267
 
208
-
209
-      <el-table-column align="center" prop="name" width="90" label="先行自付金额">
268
+      <el-table-column
269
+        align="center"
270
+        prop="name"
271
+        width="90"
272
+        label="先行自付金额"
273
+      >
210 274
         <template slot-scope="scope">
211
-          <div> {{scope.row.preselfpay_amt}}元</div>
275
+          <div>{{ scope.row.preselfpay_amt }}元</div>
212 276
         </template>
213 277
       </el-table-column>
214 278
 
215
-
216
-      <el-table-column align="center" prop="name" width="90" label="符合正常范围金额">
279
+      <el-table-column
280
+        align="center"
281
+        prop="name"
282
+        width="90"
283
+        label="符合正常范围金额"
284
+      >
217 285
         <template slot-scope="scope">
218
-          <div> {{scope.row.inscp_scp_amt}}元</div>
286
+          <div>{{ scope.row.inscp_scp_amt }}元</div>
219 287
         </template>
220 288
       </el-table-column>
221 289
 
222
-
223
-
224
-
225 290
       <el-table-column align="center" prop="name" width="50" label="备注">
226
-        <template slot-scope="scope">{{scope.row.remark}}</template>
291
+        <template slot-scope="scope">{{ scope.row.remark }}</template>
227 292
       </el-table-column>
228 293
     </el-table>
229 294
 
230 295
     <div class="additionalBox">
231
-      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
232
-        <span :title="item.item_name">{{item.item_name}}</span>
233
-        <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
296
+      <div
297
+        class="additionalOne"
298
+        v-for="(item, index) in prescription.addition"
299
+        :key="index"
300
+      >
301
+        <span :title="item.item_name">{{ item.item_name }}</span>
302
+        <el-input
303
+          v-model="item.price"
304
+          placeholder=""
305
+          style="width: 50px"
306
+          readonly
307
+        ></el-input>
234 308
235
-        <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
309
+        <el-input
310
+          v-model="item.count"
311
+          placeholder=""
312
+          style="width: 50px"
313
+          readonly
314
+        ></el-input>
236 315
237 316
         <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
238 317
       </div>
@@ -241,89 +320,104 @@
241 320
 </template>
242 321
 
243 322
 <script>
244
-  import { getInitData } from '@/api/his/his'
245
-  import { getDictionaryDataConfig} from "@/utils/data";
246
-
247
-  export default {
248
-    props: {
249
-      prescription: Object,
250
-      manufacturers:Array,
323
+import { getInitData } from "@/api/his/his";
324
+import { getDictionaryDataConfig } from "@/utils/data";
325
+
326
+export default {
327
+  props: {
328
+    prescription: Object,
329
+    manufacturers: Array,
330
+  },
331
+  data() {
332
+    return {
333
+      drugways: [],
334
+      efs: [],
335
+    };
336
+  },
337
+  mounted() {
338
+    // getInitData().then(response => {
339
+    //   if (response.data.state == 0) {
340
+    //     this.$message.error(response.data.msg)
341
+    //     return false
342
+    //   } else {
343
+    //     this.drugways = response.data.data.drugways
344
+    //     this.efs = response.data.data.efs
345
+    //   }
346
+    // })
347
+  },
348
+  methods: {
349
+    changColor({ row, rowIndex }) {
350
+     if (rowIndex % 2 == 1) { // 变颜色的条件
351
+		return {
352
+		backgroundColor: "#ACD6FF"  // 这个return的就是样式 可以是color 也可以是backgroundColor
353
+		}
354
+	}else{
355
+    return {
356
+      backgroundColor:"#FFF8D7"
357
+    }
358
+  }
251 359
     },
252
-    data() {
253
-      return {
254
-        drugways: [],
255
-        efs: [],
256
-      }
257
-    }, mounted() {
258
-      // getInitData().then(response => {
259
-      //   if (response.data.state == 0) {
260
-      //     this.$message.error(response.data.msg)
261
-      //     return false
262
-      //   } else {
263
-      //     this.drugways = response.data.data.drugways
264
-      //     this.efs = response.data.data.efs
265
-      //   }
266
-      // })
267
-    }, methods:  {
268 360
 
269
-      getName(id){
270
-        let  name = ""
271
-        for(let i = 0; i  < this.manufacturers.length; i++){
272
-          if(id == this.manufacturers[i].id){
273
-            name =  this.manufacturers[i].manufacturer_name
274
-          }
361
+    getName(id) {
362
+      let name = "";
363
+      for (let i = 0; i < this.manufacturers.length; i++) {
364
+        if (id == this.manufacturers[i].id) {
365
+          name = this.manufacturers[i].manufacturer_name;
275 366
         }
276
-        return name
277
-
278
-      },
279
-      getGroup(id){
280
-        var name = ""
281
-        var statistics_category =  getDictionaryDataConfig('system','statistics_category')
282
-        console.log("2235",statistics_category)
283
-        for(let i=0;i<statistics_category.length;i++){
284
-          if(id == statistics_category[i].id){
285
-            name = statistics_category[i].name
286
-          }
367
+      }
368
+      return name;
369
+    },
370
+    getGroup(id) {
371
+      var name = "";
372
+      var statistics_category = getDictionaryDataConfig(
373
+        "system",
374
+        "statistics_category"
375
+      );
376
+      console.log("2235", statistics_category);
377
+      for (let i = 0; i < statistics_category.length; i++) {
378
+        if (id == statistics_category[i].id) {
379
+          name = statistics_category[i].name;
287 380
         }
288
-        return name
289
-      },
290
-
291
-
292
-    }
293
-  }
381
+      }
382
+      return name;
383
+    },
384
+  },
385
+};
294 386
 </script>
295 387
 
388
+
296 389
 <style lang="scss">
297
-.prescriptionTable{
298
-    .additionalBox{
299
-      margin-top: 20px;
390
+.prescriptionTable {
391
+  .additionalBox {
392
+    margin-top: 20px;
393
+    display: flex;
394
+    flex-wrap: wrap;
395
+    .additionalOne {
396
+      margin-right: 20px;
397
+      margin-bottom: 10px;
300 398
       display: flex;
301
-      flex-wrap: wrap;
302
-      .additionalOne{
303
-        margin-right:20px;
304
-        margin-bottom:10px;
305
-        display: flex;
306
-        align-items: center;
307
-        >span{
308
-          white-space: nowrap;
309
-          overflow: hidden;
310
-          text-overflow: ellipsis;
311
-          width:80px;
312
-          display: inline-block;
313
-          font-size: 14px;
314
-        }
399
+      align-items: center;
400
+      > span {
401
+        white-space: nowrap;
402
+        overflow: hidden;
403
+        text-overflow: ellipsis;
404
+        width: 80px;
405
+        display: inline-block;
406
+        font-size: 14px;
315 407
       }
316
-      .deleteIcon{
317
-        color:red;
318
-        margin-left:5px;
319
-      }
320
-    }
321
-    .el-table th .cell, .el-table td .cell{
322
-        padding: 0 2px;
323
-        white-space: pre-line;
324 408
     }
325
-    .el-icon-delete{
326
-        color:red;
409
+    .deleteIcon {
410
+      color: red;
411
+      margin-left: 5px;
327 412
     }
413
+  }
414
+  .el-table th .cell,
415
+  .el-table td .cell {
416
+    padding: 0 2px;
417
+    white-space: pre-line;
418
+  }
419
+  .el-icon-delete {
420
+    color: red;
421
+  }
328 422
 }
329 423
 </style>

+ 3 - 2
src/xt_pages/outpatientCharges/statementTemplate/printThree.vue 查看文件

@@ -147,8 +147,9 @@
147 147
 
148 148
         </div>
149 149
         <div v-else id='prescription-print' class="prescription-print" style="position: relative;">
150
-            <img style="width:100%;height:80px" v-if="$store.getters.xt_user.org_id != 10278" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
151
-            <img style="width:100%;height:80px" v-else src="https://kuyi.shengws.com/beierlog.png" alt="">
150
+            <img style="width:100%;height:80px" v-if="$store.getters.xt_user.org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
151
+            <img style="width:100%;height:80px" v-if="$store.getters.xt_user.org_id == 10278" src="https://kuyi.shengws.com/beierlog.png" alt="">
152
+           
152 153
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
153 154
             <div style="display:flex;">
154 155
                 <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span>

+ 3 - 3
src/xt_pages/outpatientDoctorStation/template/printThree.vue 查看文件

@@ -3,8 +3,8 @@
3 3
   <div id='prescriptionPrint1'>
4 4
     <div v-for="(item,index) in advicePrint" :key="index">
5 5
       <div id='prescription-print' v-if="item.project.length == 0" v-for='(i,pageIndex) in item.pageArr.length' :key="pageIndex" class="prescription-print" style="page-break-after: always;">
6
-          <span v-if="org_id == 10138"> <img src="https://kuyi.shengws.com/bailin/bltotle.jpg" style="width:100%" alt=""></span>
7
-          <span v-if="org_id == 10278"> <img src="https://kuyi.shengws.com/beierlog.png" style="width:100%" alt=""></span>
6
+          <span v-if="org_id == 10138"> <img src="https://kuyi.shengws.com/bailin/bltotle.jpg" style="width:100%" alt=""></span> 
7
+          <span v-if="org_id == 10278"> <img src="https://kuyi.shengws.com/beierlog.png" style="width:100%" alt=""></span> 
8 8
           <div class="printTitle">
9 9
             处方笺
10 10
             <span v-if="item.med_type == '1111'" style="margin-left: 50px;border: 1px solid #000;">精一</span>
@@ -71,7 +71,7 @@
71 71
           </div>
72 72
           <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
73 73
           <div>*药品属于特殊商品,非质量问题不允许退换</div>
74
-          <span v-if="org_id == 10138"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span>
74
+          <span v-if="org_id == 10138"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span> 
75 75
           <span v-if="org_id == 10278"><img src="https://kuyi.shengws.com/bailinbeier.png" style="width:100%" alt=""></span>
76 76
           <!-- <div class="doctorBox">
77 77
               <p>医师:{{item.doctor?item.doctor:""}}</p>

+ 2 - 2
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue 查看文件

@@ -92,8 +92,8 @@
92 92
           <div style="display:flex;">
93 93
             打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
94 94
           </div>
95
-          <span v-if="org_id == 10138"></span> <img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt="">
96
-          <span v-if="org_id == 10278"></span> <img src="https://kuyi.shengws.com/bailinbeier.png" style="width:100%" alt="">
95
+          <span v-if="org_id == 10138"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span> 
96
+          <span v-if="org_id == 10278"><img src="https://kuyi.shengws.com/bailinbeier.png" style="width:100%" alt=""></span> 
97 97
           <div style="page-break-after:always"></div>
98 98
      </div>
99 99
 

+ 119 - 3
src/xt_pages/supply/components/addGoodReturn.vue 查看文件

@@ -202,6 +202,7 @@
202 202
                 :rules="tableRules.supply_count"
203 203
               >
204 204
                 <el-input
205
+                  @input="getSupplyCount(scope.row.supply_count,scope.row.sum_count,scope.row.supply_unit,scope.row.type,scope.row.min_number,scope.row.max_unit,scope.row.min_unit,scope.$index)"
205 206
                   v-model="scope.row.supply_count"
206 207
                   style="width: 80px"
207 208
                   :disabled="disabled"
@@ -554,6 +555,12 @@ export default {
554 555
               drugList[i].unitList[0].name = drugList[i].max_unit;
555 556
               drugList[i].unitList[1].name = drugList[i].min_unit;
556 557
             }
558
+            drugList[i].sum_count =  this.getWarehoseInfoTwo(
559
+              drugList[i].drug_warehouse_info,
560
+              drugList[i].max_unit,
561
+              drugList[i].min_unit,
562
+              drugList[i].min_number
563
+            );
557 564
             this.tabList.push(drugList[i]);
558 565
           }
559 566
           this.drugList = drugList;
@@ -601,6 +608,10 @@ export default {
601 608
             for (let j = 0; j < goodList[i].unitList.length; j++) {
602 609
               goodList[i].unitList[0].name = goodList[i].packing_unit;
603 610
             }
611
+        
612
+            goodList[i].sum_count = this.getTotalStockCountTwo(
613
+              goodList[i].good_warehouse_info
614
+            );
604 615
             this.tabList.push(goodList[i]);
605 616
           }
606 617
           this.goodList = goodList;
@@ -611,6 +622,7 @@ export default {
611 622
       this.currentIndex = val;
612 623
     },
613 624
     changeName(val) {
625
+      console.log("val332322323233",val)
614 626
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
615 627
         if (this.currentIndex == i) {
616 628
           this.recordInfo.tableList[i].project_id = val.id;
@@ -643,6 +655,16 @@ export default {
643 655
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
644 656
           this.recordInfo.tableList[i].unitList = val.unitList;
645 657
           this.recordInfo.tableList[i].count = val.count
658
+          this.recordInfo.tableList[i].sum_count = val.sum_count
659
+          if(val.type == 1){
660
+            this.recordInfo.tableList[i].min_number = val.min_number
661
+            this.recordInfo.tableList[i].max_unit = val.max_unit
662
+            this.recordInfo.tableList[i].min_unit = val.min_unit
663
+          }else{
664
+             this.recordInfo.tableList[i].max_unit = ""
665
+             this.recordInfo.tableList[i].min_unit = ""
666
+             this.recordInfo.tableList[i].min_number = ""
667
+          }
646 668
         }
647 669
       }
648 670
     },
@@ -674,6 +696,10 @@ export default {
674 696
       tempObj["good_number"] = ""
675 697
       tempObj["min_price"] = "";
676 698
       tempObj["deposit_rate"] = ""
699
+      tempObj["sum_count"] = 0
700
+      tempObj["min_number"] = 0
701
+      tempObj["max_unit"] = ""
702
+      tempObj["min_unit"] = ""
677 703
       this.recordInfo.tableList.push(tempObj);
678 704
     },
679 705
     handleDelete: function (index, row) {
@@ -712,6 +738,15 @@ export default {
712 738
       console.log("hh2332232332",max_str + min_str)
713 739
       return max_str + min_str;
714 740
     },
741
+    getWarehoseInfoTwo(arr, max_unit, min_unit, min_number){
742
+      var total = 0;
743
+      if (arr.length > 0) {
744
+        for (let i = 0; i < arr.length; i++) {
745
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
746
+        }
747
+      }
748
+      return total
749
+    },
715 750
     getTotalStockCount(arr) {
716 751
       var total_count = 0;
717 752
       for (let i = 0; i < arr.length; i++) {
@@ -723,6 +758,14 @@ export default {
723 758
         return ""
724 759
       }
725 760
       
761
+    },
762
+    getTotalStockCountTwo(arr) {
763
+      var total_count = 0;
764
+      for (let i = 0; i < arr.length; i++) {
765
+        total_count += arr[i].stock_count;
766
+      }
767
+      return total_count
768
+    
726 769
     },
727 770
     calculate: function (val) {
728 771
       if (isNaN(val)) {
@@ -833,7 +876,7 @@ export default {
833 876
             }
834 877
             orderInfo[i].id = orderInfo[i].id;
835 878
             orderInfo[i].supply_count = orderInfo[i].supply_count;
836
-            orderInfo[i].count = orderInfo[i].count
879
+            
837 880
             orderInfo[i].supply_price = orderInfo[i].price;
838 881
             orderInfo[i].supply_remake = orderInfo[i].remark;
839 882
             orderInfo[i].type = orderInfo[i].is_source;
@@ -864,8 +907,20 @@ export default {
864 907
                     orderInfo[i].unitList = [{ id: 1, name: "" }];
865 908
                     orderInfo[i].unitList[0].name = drugList[j].max_unit;
866 909
                   }
910
+                   //用来统计数量比大小
911
+                 if(orderInfo[i].supply_unit == drugList[j].max_unit){
912
+                    orderInfo[i].sum_count = orderInfo[i].count*drugList[j].min_number
913
+                  }
914
+                  if(orderInfo[i].supply_unit == drugList[j].min_unit){
915
+                     orderInfo[i].sum_count = orderInfo[i].count
916
+                  }
917
+                  orderInfo[i].min_number =  drugList[j].min_number
918
+                  orderInfo[i].max_unit =drugList[j].max_unit
919
+                  orderInfo[i].min_unit =drugList[j].min_unit
867 920
                 }
921
+               
868 922
               }
923
+              orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
869 924
             }
870 925
             if (orderInfo[i].is_source == 2) {
871 926
               for (let j = 0; j < goodList.length; j++) {
@@ -874,10 +929,16 @@ export default {
874 929
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
875 930
                 }
876 931
               }
932
+              orderInfo[i].sum_count = orderInfo[i].count
933
+              orderInfo[i].min_number = 0
934
+              orderInfo[i].count = orderInfo[i].count;
935
+              orderInfo[i].max_unit =""
936
+              orderInfo[i].min_unit =""
877 937
             }
878 938
           }
879 939
 
880 940
           this.recordInfo.tableList = [];
941
+          console.log("相亲233232322332323223322323",orderInfo)
881 942
           this.recordInfo.tableList = orderInfo;
882 943
           this.tableDataList = []
883 944
           this.tableDataList = orderInfo
@@ -894,6 +955,11 @@ export default {
894 955
         if(valid){
895 956
           this.loading = true
896 957
           for(let i=0;i<this.recordInfo.tableList.length;i++){
958
+            if(this.recordInfo.tableList[i].count == ""){
959
+              this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
960
+              this.loading = false
961
+              return false
962
+            }
897 963
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
898 964
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
899 965
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
@@ -916,7 +982,7 @@ export default {
916 982
             }
917 983
           } 
918 984
            //判断是否在采购单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
919
-           if(this.recordInfo.tableList.length != this.tableDataList.length){
985
+           if(this.recordInfo.tableList.length < this.tableDataList.length){
920 986
              warehouse_out_id = 0
921 987
              for(let i=0;i<this.recordInfo.tableList.length;i++){
922 988
                 this.recordInfo.tableList[i].id = 0
@@ -1102,7 +1168,53 @@ export default {
1102 1168
         }
1103 1169
       });
1104 1170
     },
1105
-   
1171
+    getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
1172
+     console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
1173
+      var total_count = 0
1174
+      
1175
+      if(type == 1){
1176
+       if(supply_unit == max_unit){
1177
+          total_count = supply_count * min_number
1178
+       }
1179
+       if(supply_unit == min_unit){
1180
+         total_count = supply_count
1181
+       }
1182
+       console.log("sum_counts",sum_count)
1183
+       console.log("count232232332",total_count)
1184
+       if(total_count > sum_count){
1185
+         this.$message.error("数量不能大于可退数量!")
1186
+         for(let i=0;i<this.recordInfo.tableList.length;i++){
1187
+           if(index == i){
1188
+             this.recordInfo.tableList[i].supply_count = ""
1189
+           }
1190
+         }
1191
+       }else{
1192
+           for(let i=0;i<this.recordInfo.tableList.length;i++){
1193
+            if(index == i){
1194
+              this.recordInfo.tableList[i].supply_count = supply_count
1195
+            }
1196
+          }
1197
+         }
1198
+      }
1199
+       
1200
+      if(type == 2){
1201
+         if(supply_count > sum_count){
1202
+          this.$message.error("数量不能大于可退数量!")
1203
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
1204
+            if(index == i){
1205
+              this.recordInfo.tableList[i].supply_count = ""
1206
+            }
1207
+          }
1208
+         }else{
1209
+           for(let i=0;i<this.recordInfo.tableList.length;i++){
1210
+            if(index == i){
1211
+              this.recordInfo.tableList[i].supply_count = supply_count
1212
+            }
1213
+          }
1214
+         }
1215
+      }
1216
+    
1217
+    },
1106 1218
   },
1107 1219
   created() {
1108 1220
     const tempObj = {};
@@ -1132,6 +1244,10 @@ export default {
1132 1244
     tempObj["good_number"] = ""
1133 1245
     tempObj["min_price"] = "";
1134 1246
     tempObj["deposit_rate"] = ""
1247
+    tempObj["sum_count"] = 0
1248
+    tempObj["min_number"] = 0
1249
+    tempObj["max_unit"] = ""
1250
+    tempObj["min_unit"] = ""
1135 1251
     this.recordInfo.tableList.push(tempObj);
1136 1252
    
1137 1253
     this.getInitOrder();

+ 131 - 16
src/xt_pages/supply/components/editGoodReturn.vue 查看文件

@@ -174,12 +174,12 @@
174 174
                   placeholder="请选择"
175 175
                   :disabled="disabled"
176 176
                 >
177
-                  <!-- <el-option
178
-                            v-for="(item,index) in scope.row.unitList"
179
-                            :key="index"
180
-                            :label="item.name"
181
-                            :value="item.name">
182
-                        </el-option> -->
177
+                  <el-option
178
+                    v-for="(item,index) in scope.row.unitList"
179
+                    :key="index"
180
+                    :label="item.name"
181
+                    :value="item.name">
182
+                  </el-option>
183 183
                 </el-select>
184 184
               </el-form-item>
185 185
             </template>
@@ -214,6 +214,7 @@
214 214
                 :rules="tableRules.supply_count"
215 215
               >
216 216
                 <el-input
217
+                 @input="getSupplyCount(scope.row.supply_count,scope.row.sum_count,scope.row.supply_unit,scope.row.type,scope.row.min_number,scope.row.max_unit,scope.row.min_unit,scope.$index)"
217 218
                   v-model="scope.row.supply_count"
218 219
                   style="width: 80px"
219 220
                   :disabled="disabled"
@@ -554,6 +555,7 @@ export default {
554 555
               drugList[i].min_unit,
555 556
               drugList[i].min_number
556 557
             );
558
+            
557 559
             drugList[i].supply_count = "";
558 560
             drugList[i].supply_total_price = "";
559 561
             drugList[i].supply_manufacturer = drugList[i].manufacturer;
@@ -562,7 +564,6 @@ export default {
562 564
             drugList[i].type = 1;
563 565
             drugList[i].supply_price = drugList[i].last_price;
564 566
             drugList[i].name = drugList[i].drug_name;
565
-            drugList[i].count = ""
566 567
             drugList[i].unitList = [
567 568
               { id: 1, name: "" },
568 569
               { id: 2, name: "" },
@@ -572,6 +573,12 @@ export default {
572 573
               drugList[i].unitList[0].name = drugList[i].max_unit;
573 574
               drugList[i].unitList[1].name = drugList[i].min_unit;
574 575
             }
576
+            drugList[i].sum_count =  this.getWarehoseInfoTwo(
577
+              drugList[i].drug_warehouse_info,
578
+              drugList[i].max_unit,
579
+              drugList[i].min_unit,
580
+              drugList[i].min_number
581
+            );
575 582
             this.tabList.push(drugList[i]);
576 583
           }
577 584
           this.drugList = drugList;
@@ -617,10 +624,13 @@ export default {
617 624
             ];
618 625
 
619 626
             goodList[i].supply_unit = goodList[i].packing_unit;
620
-            goodList[i].count = ""
627
+
621 628
             for (let j = 0; j < goodList[i].unitList.length; j++) {
622 629
               goodList[i].unitList[0].name = goodList[i].packing_unit;
623 630
             }
631
+            goodList[i].sum_count = this.getTotalStockCountTwo(
632
+              goodList[i].good_warehouse_info
633
+            );
624 634
             this.tabList.push(goodList[i]);
625 635
           }
626 636
           this.goodList = goodList;
@@ -631,6 +641,7 @@ export default {
631 641
       this.currentIndex = val;
632 642
     },
633 643
     changeName(val) {
644
+    
634 645
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
635 646
         if (this.currentIndex == i) {
636 647
           this.recordInfo.tableList[i].project_id = val.id;
@@ -638,8 +649,7 @@ export default {
638 649
           this.recordInfo.tableList[i].name = val.name;
639 650
           this.recordInfo.tableList[i].supply_name = val.supply_name;
640 651
           this.recordInfo.tableList[i].supply_type = val.supply_type;
641
-          this.recordInfo.tableList[i].supply_specification_name =
642
-            val.supply_specification_name;
652
+          this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name;
643 653
           this.recordInfo.tableList[i].supply_total = val.supply_total;
644 654
           if (val.supply_count == NaN) {
645 655
             this.recordInfo.tableList[i].supply_count = "";
@@ -663,6 +673,19 @@ export default {
663 673
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
664 674
           this.recordInfo.tableList[i].unitList = val.unitList;
665 675
           this.recordInfo.tableList[i].count = val.count
676
+          this.recordInfo.tableList[i].sum_count = val.sum_count
677
+          
678
+          if(val.type == 1){
679
+            this.recordInfo.tableList[i].min_number = val.min_number
680
+            this.recordInfo.tableList[i].max_unit = val.max_unit
681
+            this.recordInfo.tableList[i].min_unit = val.min_unit
682
+          }else{
683
+             this.recordInfo.tableList[i].max_unit = ""
684
+             this.recordInfo.tableList[i].min_unit = ""
685
+             this.recordInfo.tableList[i].min_number = ""
686
+          }
687
+          
688
+         
666 689
         }
667 690
       }
668 691
     },
@@ -698,6 +721,10 @@ export default {
698 721
       tempObj["good_number"] = ""
699 722
       tempObj["deposit_rate"] = ""
700 723
       tempObj["order_number"] = ""
724
+      tempObj["sum_count"] =0
725
+      tempObj["min_number"] = 0
726
+      tempObj["max_unit"] = ""
727
+      tempObj["min_unit"] = ""
701 728
       this.recordInfo.tableList.push(tempObj);
702 729
     },
703 730
     handleDelete: function (index, row) {
@@ -744,6 +771,7 @@ export default {
744 771
       var min_str = "";
745 772
       if (arr.length > 0) {
746 773
         for (let i = 0; i < arr.length; i++) {
774
+
747 775
           total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
748 776
         }
749 777
       }
@@ -764,6 +792,15 @@ export default {
764 792
       }
765 793
       return max_str + min_str;
766 794
     },
795
+    getWarehoseInfoTwo(arr, max_unit, min_unit, min_number){
796
+      var total = 0;
797
+      if (arr.length > 0) {
798
+        for (let i = 0; i < arr.length; i++) {
799
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
800
+        }
801
+      }
802
+      return total
803
+    },
767 804
     getTotalStockCount(arr) {
768 805
       var total_count = 0;
769 806
       for (let i = 0; i < arr.length; i++) {
@@ -775,6 +812,14 @@ export default {
775 812
         return ""
776 813
       }
777 814
     
815
+    },
816
+    getTotalStockCountTwo(arr) {
817
+      var total_count = 0;
818
+      for (let i = 0; i < arr.length; i++) {
819
+        total_count += arr[i].stock_count;
820
+      }
821
+      return total_count
822
+    
778 823
     },
779 824
     calculate: function (val) {
780 825
       if (isNaN(val)) {
@@ -893,6 +938,53 @@ export default {
893 938
     count_arrearage() {
894 939
       this.payment = this.total_price - this.arrearage;
895 940
     },
941
+    getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
942
+     console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
943
+      var total_count = 0
944
+      
945
+      if(type == 1){
946
+       if(supply_unit == max_unit){
947
+          total_count = supply_count * min_number
948
+       }
949
+       if(supply_unit == min_unit){
950
+         total_count = supply_count
951
+       }
952
+       console.log("sum_counts",sum_count)
953
+       console.log("count232232332",total_count)
954
+       if(total_count > sum_count){
955
+         this.$message.error("数量不能大于可退数量!")
956
+         for(let i=0;i<this.recordInfo.tableList.length;i++){
957
+           if(index == i){
958
+             this.recordInfo.tableList[i].supply_count = ""
959
+           }
960
+         }
961
+       }else{
962
+           for(let i=0;i<this.recordInfo.tableList.length;i++){
963
+            if(index == i){
964
+              this.recordInfo.tableList[i].supply_count = supply_count
965
+            }
966
+          }
967
+         }
968
+      }
969
+       
970
+      if(type == 2){
971
+         if(supply_count > sum_count){
972
+          this.$message.error("数量不能大于可退数量!")
973
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
974
+            if(index == i){
975
+              this.recordInfo.tableList[i].supply_count = ""
976
+            }
977
+          }
978
+         }else{
979
+           for(let i=0;i<this.recordInfo.tableList.length;i++){
980
+            if(index == i){
981
+              this.recordInfo.tableList[i].supply_count = supply_count
982
+            }
983
+          }
984
+         }
985
+      }
986
+    
987
+    },
896 988
     getGoodReturnDetail() {
897 989
       var id = this.$route.query.id;
898 990
       getGoodReturnDetail(id).then((response) => {
@@ -921,7 +1013,6 @@ export default {
921 1013
           for (let i = 0; i < orderInfo.length; i++) {
922 1014
             orderInfo[i].id = orderInfo[i].id;
923 1015
             orderInfo[i].supply_count = orderInfo[i].supply_count;
924
-            orderInfo[i].count = orderInfo[i].count;
925 1016
             orderInfo[i].supply_price = orderInfo[i].price;
926 1017
             orderInfo[i].supply_remake = orderInfo[i].remark;
927 1018
             orderInfo[i].type = orderInfo[i].is_source;
@@ -937,11 +1028,9 @@ export default {
937 1028
             if (orderInfo[i].is_source == 1) {
938 1029
               for (let j = 0; j < drugList.length; j++) {
939 1030
                 if (orderInfo[i].project_id == drugList[j].id) {
1031
+                  
940 1032
                   if (drugList[j].max_unit != drugList[j].min_unit) {
941
-                    orderInfo[i].unitList = [
942
-                      { id: 1, name: "" },
943
-                      { id: 2, name: "" },
944
-                    ];
1033
+                    orderInfo[i].unitList = [{ id: 1, name: "" },{ id: 2, name: "" }];
945 1034
                     orderInfo[i].unitList[0].name = drugList[j].max_unit;
946 1035
                     orderInfo[i].unitList[1].name = drugList[j].min_unit;
947 1036
                   }
@@ -949,8 +1038,19 @@ export default {
949 1038
                     orderInfo[i].unitList = [{ id: 1, name: "" }];
950 1039
                     orderInfo[i].unitList[0].name = drugList[j].max_unit;
951 1040
                   }
1041
+                  //用来统计数量比大小
1042
+                  if(orderInfo[i].supply_unit == drugList[j].max_unit){
1043
+                    orderInfo[i].sum_count = orderInfo[i].count*drugList[j].min_number
1044
+                  }
1045
+                  if(orderInfo[i].supply_unit == drugList[j].min_unit){
1046
+                     orderInfo[i].sum_count = orderInfo[i].count
1047
+                  }
1048
+                  orderInfo[i].min_number =  drugList[j].min_number
1049
+                  orderInfo[i].max_unit =drugList[j].max_unit
1050
+                  orderInfo[i].min_unit =drugList[j].min_unit
952 1051
                 }
953 1052
               }
1053
+              orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
954 1054
             }
955 1055
             if (orderInfo[i].is_source == 2) {
956 1056
               for (let j = 0; j < goodList.length; j++) {
@@ -959,10 +1059,16 @@ export default {
959 1059
                   orderInfo[i].unitList[0].name = goodList[j].packing_unit;
960 1060
                 }
961 1061
               }
1062
+              orderInfo[i].sum_count = orderInfo[i].count
1063
+              orderInfo[i].min_number = 0
1064
+              orderInfo[i].count = orderInfo[i].count;
1065
+              orderInfo[i].max_unit =""
1066
+              orderInfo[i].min_unit =""
962 1067
             }
963 1068
           }
964 1069
 
965 1070
           this.recordInfo.tableList = [];
1071
+          console.log("or233232332233223233223",orderInfo)
966 1072
           this.recordInfo.tableList = orderInfo;
967 1073
         }
968 1074
       });
@@ -977,6 +1083,11 @@ export default {
977 1083
         if (valid) {
978 1084
           this.loading = true;
979 1085
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
1086
+            if(this.recordInfo.tableList[i].count == ""){
1087
+              this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
1088
+              this.loading = false
1089
+              return false
1090
+            }
980 1091
             this.recordInfo.tableList[i].supply_count = parseInt(
981 1092
               this.recordInfo.tableList[i].supply_count
982 1093
             );
@@ -1008,7 +1119,7 @@ export default {
1008 1119
             return_marke: this.return_remark,
1009 1120
           };
1010 1121
           console.log("parms32322332",params)
1011
-         
1122
+          
1012 1123
           updateGoodReturn(
1013 1124
             params,
1014 1125
             warehouse_out_id,
@@ -1114,6 +1225,10 @@ export default {
1114 1225
     tempObj["good_number"] = ""
1115 1226
     tempObj["deposit_rate"] = ""
1116 1227
     tempObj["order_number"] = ""
1228
+    tempObj["sum_count"] = 0
1229
+    tempObj["min_number"] = 0
1230
+    tempObj["max_unit"] = ""
1231
+    tempObj["min_unit"] = ""
1117 1232
     this.recordInfo.tableList.push(tempObj);
1118 1233
     this.getInitOrder();
1119 1234
 

+ 10 - 3
src/xt_pages/supply/purchaseOrderQuery.vue 查看文件

@@ -128,10 +128,17 @@
128 128
             <!-- <span v-if="scope.row.is_warehouse == 1">全部入库</span>
129 129
             <span v-if="scope.row.is_warehouse == 2">未入库</span>
130 130
             <span v-if="scope.row.is_warehouse == 3">部分入库</span> -->
131
-            <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length == 0">未入库</span> 
131
+          
132 132
             <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length > 0">
133
-            <span v-if="getStatus(scope.row.orderOut) >= getAllCount(scope.row.orderInfo) ">全部入库</span> 
134
-            <span v-if="getStatus(scope.row.orderOut) < getAllCount(scope.row.orderInfo) ">部分入库</span> 
133
+              <span >
134
+                <span v-if="getStatus(scope.row.orderOut) == 0">未入库</span>
135
+                <span v-if="getStatus(scope.row.orderOut) > 0">
136
+                  <span v-if="getStatus(scope.row.orderOut) >= getAllCount(scope.row.orderInfo) ">全部入库</span> 
137
+                  <span v-if="getStatus(scope.row.orderOut) < getAllCount(scope.row.orderInfo) ">部分入库</span>
138
+                </span>
139
+              </span> 
140
+              
141
+              
135 142
             </span> 
136 143
           </template>
137 144
         </el-table-column>