|
@@ -15,7 +15,7 @@
|
|
|
{
|
|
|
text: '申购',
|
|
|
disabled: selectData.length === 0,
|
|
|
- action: () => openModal(),
|
|
|
+ action: () => openModal(false),
|
|
|
},
|
|
|
|
|
|
|
|
@@ -131,6 +131,7 @@ const config = computed(() => {
|
|
|
label: "物流/快递信息",
|
|
|
prop: "logisticsCompanyName",
|
|
|
slot: "logistics",
|
|
|
+ width: 200,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -144,7 +145,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "物品名称",
|
|
|
prop: "productName",
|
|
|
- width: 150,
|
|
|
+ width: 140,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -174,7 +175,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "退货单号",
|
|
|
prop: "backLogisticsCode",
|
|
|
- width: 160,
|
|
|
+ width: 150,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -202,8 +203,8 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- selectData.value = row;
|
|
|
- openModal();
|
|
|
+ selectDataOne.value = [row];
|
|
|
+ openModal(true);
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
@@ -415,23 +416,53 @@ getList();
|
|
|
getDict();
|
|
|
onMounted(() => {});
|
|
|
const selectData = ref([]);
|
|
|
+const selectDataOne = ref([]);
|
|
|
const selectionChange = (data) => {
|
|
|
selectData.value = data;
|
|
|
};
|
|
|
-onActivated(() => {
|
|
|
- selectData.value = [];
|
|
|
+watch(selectData, (newVal, oldVal) => {
|
|
|
+ if (newVal.length == 0) {
|
|
|
+ sourceList.value.data.forEach((x) => {
|
|
|
+ if (x.processingMethod > 0) {
|
|
|
+ x.isCheck = false;
|
|
|
+ } else {
|
|
|
+ x.isCheck = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (newVal.length == 1) {
|
|
|
+ const current = newVal[0];
|
|
|
+ sourceList.value.data.forEach((x) => {
|
|
|
+ if (x.stockWaitId != current.stockWaitId) {
|
|
|
+ x.isCheck = false;
|
|
|
+ } else {
|
|
|
+ x.isCheck = x.processingMethod > 0 ? false : true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
-const openModal = () => {
|
|
|
- proxy.$router.push({
|
|
|
- path: "/platform_manage/process/processApproval",
|
|
|
- query: {
|
|
|
- flowKey: "wdly_apply_purchase",
|
|
|
- flowName: "申购发起",
|
|
|
- random: proxy.random(),
|
|
|
- arr: JSON.stringify(selectData.value),
|
|
|
- },
|
|
|
- });
|
|
|
+const openModal = (flag = false) => {
|
|
|
+ if (flag) {
|
|
|
+ proxy.$router.push({
|
|
|
+ path: "/platform_manage/process/processApproval",
|
|
|
+ query: {
|
|
|
+ flowKey: "wdly_apply_purchase",
|
|
|
+ flowName: "申购发起",
|
|
|
+ random: proxy.random(),
|
|
|
+ arr: JSON.stringify(selectDataOne.value),
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ proxy.$router.push({
|
|
|
+ path: "/platform_manage/process/processApproval",
|
|
|
+ query: {
|
|
|
+ flowKey: "wdly_apply_purchase",
|
|
|
+ flowName: "申购发起",
|
|
|
+ random: proxy.random(),
|
|
|
+ arr: JSON.stringify(selectData.value),
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const openModalOne = (flag, arr = []) => {
|