|
@@ -429,10 +429,12 @@
|
429
|
429
|
</div>
|
430
|
430
|
<!-- <Computed></Computed> -->
|
431
|
431
|
</div>
|
|
432
|
+ <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
|
432
|
433
|
</div>
|
433
|
434
|
</template>
|
434
|
435
|
|
435
|
436
|
<script>
|
|
437
|
+import popup from "./Popup"
|
436
|
438
|
import Computed from "../../components/Computed/index_1.vue";
|
437
|
439
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
438
|
440
|
import { uParseTime } from "@/utils/tools";
|
|
@@ -447,11 +449,13 @@ import {
|
447
|
449
|
UpdateSupplyWahouseingInfo,
|
448
|
450
|
getSupplyWarehouseOutById,
|
449
|
451
|
} from "@/api/supply";
|
|
452
|
+
|
450
|
453
|
export default {
|
451
|
454
|
name: "addPurchaseOrder",
|
452
|
455
|
components: {
|
453
|
456
|
BreadCrumb,
|
454
|
457
|
Computed,
|
|
458
|
+ popup,
|
455
|
459
|
},
|
456
|
460
|
data() {
|
457
|
461
|
return {
|
|
@@ -459,6 +463,11 @@ export default {
|
459
|
463
|
{ path: false, name: "采购单" },
|
460
|
464
|
{ path: "/supply/good/order/query", name: "编辑采购单" },
|
461
|
465
|
],
|
|
466
|
+ content_2:"退库单",
|
|
467
|
+ content:"采购单",
|
|
468
|
+ content_1:"已有以下关联数据,不能反审核",
|
|
469
|
+ type:2,
|
|
470
|
+ orderList:[],
|
462
|
471
|
showOne: true,
|
463
|
472
|
showTwo: false,
|
464
|
473
|
showThree: false,
|
|
@@ -901,27 +910,16 @@ export default {
|
901
|
910
|
this.recordInfo.tableList[i].supply_count = parseInt(
|
902
|
911
|
this.recordInfo.tableList[i].supply_count
|
903
|
912
|
);
|
904
|
|
- this.recordInfo.tableList[i].supply_price =
|
905
|
|
- this.recordInfo.tableList[i].supply_price.toString();
|
906
|
|
- this.recordInfo.tableList[i].supply_total_price =
|
907
|
|
- this.recordInfo.tableList[i].supply_total_price.toString();
|
908
|
|
- this.recordInfo.tableList[i].supply_total =
|
909
|
|
- this.recordInfo.tableList[i].supply_total.toString();
|
|
913
|
+ this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
|
|
914
|
+ this.recordInfo.tableList[i].supply_total_price = this.recordInfo.tableList[i].supply_total_price.toString();
|
|
915
|
+ this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString();
|
910
|
916
|
|
911
|
917
|
for (let j = 0; j < this.manufactuerList.length; j++) {
|
912
|
|
- if (
|
913
|
|
- this.recordInfo.tableList[i].supply_manufacturer ==
|
914
|
|
- this.manufactuerList[j].manufacturer_name
|
915
|
|
- ) {
|
916
|
|
- this.recordInfo.tableList[i].manufacturer_id =
|
917
|
|
- this.manufactuerList[j].id;
|
|
918
|
+ if ( this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name) {
|
|
919
|
+ this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id;
|
918
|
920
|
}
|
919
|
|
- if (
|
920
|
|
- this.recordInfo.tableList[i].supply_manufacturer ==
|
921
|
|
- this.manufactuerList[j].id
|
922
|
|
- ) {
|
923
|
|
- this.recordInfo.tableList[i].supply_manufacturer =
|
924
|
|
- this.manufactuerList[j].manufacturer_name;
|
|
921
|
+ if ( this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id) {
|
|
922
|
+ this.recordInfo.tableList[i].supply_manufacturer =this.manufactuerList[j].manufacturer_name;
|
925
|
923
|
}
|
926
|
924
|
}
|
927
|
925
|
}
|
|
@@ -960,6 +958,7 @@ export default {
|
960
|
958
|
getGoodOrderCountList(id, warehousing_id).then((response) => {
|
961
|
959
|
if (response.data.state == 1) {
|
962
|
960
|
this.$message.success("审核成功!");
|
|
961
|
+ this.is_check = 1
|
963
|
962
|
this.showOne = false;
|
964
|
963
|
this.showTwo = true;
|
965
|
964
|
this.showThree = true;
|
|
@@ -1185,8 +1184,9 @@ export default {
|
1185
|
1184
|
if (msg == 2) {
|
1186
|
1185
|
var cancelList = response.data.data.cancelList
|
1187
|
1186
|
console.log("cancelLIST2332322332232323",cancelList)
|
1188
|
|
- this.$message.error("该单有自动出库或生成了退货单,反审核失败!");
|
1189
|
|
- return
|
|
1187
|
+ this.orderList = cancelList
|
|
1188
|
+ this.$refs.Popup.dialogVisible = true
|
|
1189
|
+ return
|
1190
|
1190
|
}
|
1191
|
1191
|
|
1192
|
1192
|
var purcaseOrder = response.data.data.purcaseOrder;
|
|
@@ -1198,9 +1198,7 @@ export default {
|
1198
|
1198
|
var ids = "";
|
1199
|
1199
|
// 如果采购单没有数据,则代表改订单第一次生成采购订单数据
|
1200
|
1200
|
if (goodOrder.length == 0) {
|
1201
|
|
- this.$router.push({
|
1202
|
|
- path: "/good/order/add?id=" + id + "&ids=" + ids,
|
1203
|
|
- });
|
|
1201
|
+ this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
|
1204
|
1202
|
}
|
1205
|
1203
|
for (let i = 0; i < purcaseOrder.length; i++) {
|
1206
|
1204
|
for (let j = 0; j < drugList.length; j++) {
|
|
@@ -1216,8 +1214,7 @@ export default {
|
1216
|
1214
|
for (let j = 0; j < drugList.length; j++) {
|
1217
|
1215
|
if (goodOrder[i].is_source == 1) {
|
1218
|
1216
|
if (goodOrder[i].supply_unit == drugList[j].max_unit) {
|
1219
|
|
- goodOrder[i].count =
|
1220
|
|
- goodOrder[i].count * drugList[j].min_number;
|
|
1217
|
+ goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
|
1221
|
1218
|
}
|
1222
|
1219
|
}
|
1223
|
1220
|
}
|