|
@@ -110,7 +110,6 @@
|
|
label-width="180px"
|
|
label-width="180px"
|
|
>
|
|
>
|
|
<div class="flex flex-col items-start">
|
|
<div class="flex flex-col items-start">
|
|
- <!-- <div class="text-gray-400">最近10个PO的供应商列表</div> -->
|
|
|
|
<div
|
|
<div
|
|
v-for="(item, index) in recommandVendor"
|
|
v-for="(item, index) in recommandVendor"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -129,7 +128,6 @@
|
|
>
|
|
>
|
|
<div class="text-gray-400">
|
|
<div class="text-gray-400">
|
|
<span>Product Team Preferred Supplier</span>
|
|
<span>Product Team Preferred Supplier</span>
|
|
- <!-- <span class="text-sm"> (单击供应商名称快速选中)</span> -->
|
|
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
v-for="(item, index) in preferSupplier"
|
|
v-for="(item, index) in preferSupplier"
|
|
@@ -393,7 +391,7 @@
|
|
remote
|
|
remote
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
- @change="(e) => onProductSelect(e, product)"
|
|
|
|
|
|
+ @change="(e) => onProductSelect(e, product, index)"
|
|
></el-select-v2>
|
|
></el-select-v2>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-input
|
|
<el-input
|
|
@@ -445,6 +443,14 @@
|
|
type="textarea"
|
|
type="textarea"
|
|
placeholder="Free text"
|
|
placeholder="Free text"
|
|
></el-input>
|
|
></el-input>
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="checkStr(product.name)"
|
|
|
|
+ size="small"
|
|
|
|
+ @click="checkPCT230(product.name, product, index)"
|
|
|
|
+ >
|
|
|
|
+ 填充要求
|
|
|
|
+ </el-button>
|
|
</td>
|
|
</td>
|
|
<td class="amount">
|
|
<td class="amount">
|
|
<el-input
|
|
<el-input
|
|
@@ -1433,6 +1439,12 @@
|
|
<el-button @click="specialReminderVisible = false">Cancel</el-button>
|
|
<el-button @click="specialReminderVisible = false">Cancel</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <dialogPct230
|
|
|
|
+ :row="pct230Row"
|
|
|
|
+ :row2="pct230Row2"
|
|
|
|
+ :visible="pct230Visible"
|
|
|
|
+ @update:visible="onPCT230Close"
|
|
|
|
+ ></dialogPct230>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -1492,6 +1504,8 @@ import {
|
|
PrimePacSoftRuleTableData1,
|
|
PrimePacSoftRuleTableData1,
|
|
PrimePacCommonRuleTableData,
|
|
PrimePacCommonRuleTableData,
|
|
} from './const'
|
|
} from './const'
|
|
|
|
+import dialogPct230 from './dialogPct230.vue'
|
|
|
|
+
|
|
defineComponent({
|
|
defineComponent({
|
|
name: 'PurchaseOrderEdit',
|
|
name: 'PurchaseOrderEdit',
|
|
})
|
|
})
|
|
@@ -1913,7 +1927,32 @@ const onInputChange = function (e: any, obj: IProductItem, key: string) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-const onProductSelect = function (e: any, product: IProductItem) {
|
|
|
|
|
|
+let pct230Visible = ref(false)
|
|
|
|
+let pct230Row = ref({} as any)
|
|
|
|
+let pct230Row2: any = ref({ index: 0 })
|
|
|
|
+let checkStr = (str: string) =>
|
|
|
|
+ /PCT230/.test(str.toUpperCase()) && !/[))]_/.test(str)
|
|
|
|
+let checkPCT230 = (str: string, row: any, i: number) => {
|
|
|
|
+ console.log(str.toUpperCase(), 'str')
|
|
|
|
+ if (checkStr(str)) {
|
|
|
|
+ console.log(str.toUpperCase(), 'success', i)
|
|
|
|
+ pct230Visible.value = true
|
|
|
|
+ pct230Row.value = row
|
|
|
|
+ pct230Row2.value = {
|
|
|
|
+ index: i,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+let onPCT230Close = () => {
|
|
|
|
+ pct230Visible.value = false
|
|
|
|
+ pct230Row.value = {}
|
|
|
|
+ pct230Row2.value = { index: 0 }
|
|
|
|
+}
|
|
|
|
+const onProductSelect = function (
|
|
|
|
+ e: any,
|
|
|
|
+ product: IProductItem,
|
|
|
|
+ index: number,
|
|
|
|
+) {
|
|
if (e) {
|
|
if (e) {
|
|
const temp = product.candidate.filter((i) => i.value === e)
|
|
const temp = product.candidate.filter((i) => i.value === e)
|
|
if (temp.length) {
|
|
if (temp.length) {
|
|
@@ -1927,6 +1966,7 @@ const onProductSelect = function (e: any, product: IProductItem) {
|
|
: ctx.CF3 || ''
|
|
: ctx.CF3 || ''
|
|
product.CF_Product_Type = ctx.CF_Product_Type || ''
|
|
product.CF_Product_Type = ctx.CF_Product_Type || ''
|
|
})
|
|
})
|
|
|
|
+ checkPCT230(temp[0].label, product, index)
|
|
} else {
|
|
} else {
|
|
product.name = ''
|
|
product.name = ''
|
|
}
|
|
}
|
|
@@ -2355,7 +2395,6 @@ const onReminderSelect = () => {
|
|
const soData = ref({ Order_Reminder: '' } as any)
|
|
const soData = ref({ Order_Reminder: '' } as any)
|
|
Promise.all([p1, p2, p3])
|
|
Promise.all([p1, p2, p3])
|
|
.then((array: any[]) => {
|
|
.then((array: any[]) => {
|
|
- console.log(222, '222')
|
|
|
|
// p2的数据处理逻辑从原本的p2then移动到这里处理.
|
|
// p2的数据处理逻辑从原本的p2then移动到这里处理.
|
|
// 因为要根据p3用户数据的Organization 来填充产品列表里面的 requirement, 这步处理必须放在p3后面, 而p2 p3是并发操作.
|
|
// 因为要根据p3用户数据的Organization 来填充产品列表里面的 requirement, 这步处理必须放在p3后面, 而p2 p3是并发操作.
|
|
if (array[1].data.code !== 1) return
|
|
if (array[1].data.code !== 1) return
|