|
@@ -34,7 +34,8 @@
|
|
|
<a-input-number style="width:100%" id="inputNumber" :precision="2" v-model:value="data.record.qty" :min="data.record.orderminqty" :step="data.record.orderaddqty" @blur="onAddQtyChange(data.record)"/>
|
|
|
</template>
|
|
|
<template v-if="data.column.dataIndex === 'iscustom' && data.record.iscustomsize == 1">
|
|
|
- <a-button type="link" @click="openCustom(data)">定制信息</a-button>
|
|
|
+ <a-button type="link" @click="openCustom(data)" v-if="!data.record.isselect">定制信息</a-button>
|
|
|
+ <a-tag v-else closable @close="closeInfo(data.record)">{{ infoFun(data.record) }}</a-tag>
|
|
|
</template>
|
|
|
<!-- <template v-if="data.column.dataIndex === 'length' && data.record.iscustomsize == 1">
|
|
|
<a-select v-if="data.record.lengthschemedetails.length > 0" v-model:value="data.record.length" style="width: 150px" placeholder="选择长度">
|
|
@@ -99,28 +100,32 @@
|
|
|
<logistics-order></logistics-order>
|
|
|
</template>
|
|
|
</detail-template>
|
|
|
- <a-modal v-model:open="open" title="定制信息" @ok="handleOk" style="text-align:left">
|
|
|
- <div class="mt-10">
|
|
|
- <span class="label">品名:{{prod.record.itemname}}</span>
|
|
|
- </div>
|
|
|
- <div class="mt-10">
|
|
|
- <span class="label">品号:{{prod.record.itemno}}</span>
|
|
|
+ <a-modal v-model:open="open" wrapClassName="oder-modal" title="定制信息" @ok="handleOk" style="text-align:left" :closable="false">
|
|
|
+ <div class="mt-10" style="display: flex;justify-content: space-evenly;margin-top: 20px;">
|
|
|
+ <div style="display: flex;align-items: center;color: red;">
|
|
|
+ <span class="label">品号:{{prod.record.itemno}}</span>
|
|
|
+ <span class="label overflow" style="max-width: 220px;margin-left: 10px;">品名:
|
|
|
+ <a-tooltip placement="topLeft" :title="prod.record.itemname" arrow-point-at-center>
|
|
|
+ {{prod.record.itemname}}
|
|
|
+ </a-tooltip>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="mt-10" v-if="prod.record.cheekschemeid > 0">
|
|
|
<span class="label">工艺</span>
|
|
|
- <a-select v-model:value="prod.record.customcheek" style="width: 400px;" placeholder="选择长度">
|
|
|
+ <a-select v-model:value="prod.record.customcheek" style="width: 400px;" placeholder="选择工艺">
|
|
|
<a-select-option v-for="item in prod.record.cheekschemedetails" :key="item.sa_sizeschemedetailid" :value="item.num">{{item.num}}</a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
|
<div class="mt-10" v-if="prod.record.colorschemeid > 0">
|
|
|
<span class="label">颜色</span>
|
|
|
- <a-select v-model:value="prod.record.customcolors" style="width: 400px" placeholder="选择长度">
|
|
|
+ <a-select v-model:value="prod.record.customcolors" style="width: 400px" placeholder="选择颜色">
|
|
|
<a-select-option v-for="item in prod.record.colorsschemedetails" :key="item.sa_sizeschemedetailid" :value="item.num">{{item.num}}</a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
|
<div class="mt-10" v-if="prod.record.materialschemeid > 0">
|
|
|
<span class="label">选项</span>
|
|
|
- <a-select v-model:value="prod.record.custommaterial" style="width: 400px" placeholder="选择长度">
|
|
|
+ <a-select v-model:value="prod.record.custommaterial" style="width: 400px" placeholder="选择选项">
|
|
|
<a-select-option v-for="item in prod.record.materialschemedetails" :key="item.sa_sizeschemedetailid" :value="item.num">{{item.num}}</a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
@@ -512,6 +517,7 @@ const openCustom = (data)=>{
|
|
|
prod.value = data
|
|
|
}
|
|
|
const handleOk = ()=>{
|
|
|
+ prod.value.record.isselect = true
|
|
|
prodlist.value.data.some((item)=>{
|
|
|
if (item.itemid == prod.value.itemid) {
|
|
|
item = prod.value
|
|
@@ -519,6 +525,33 @@ const handleOk = ()=>{
|
|
|
})
|
|
|
open.value = false
|
|
|
}
|
|
|
+const closeInfo = (data) => {
|
|
|
+ data.isselect = false
|
|
|
+ data.customcheek = null
|
|
|
+ data.customcolors = null
|
|
|
+ data.custommaterial = null
|
|
|
+ data.length = null
|
|
|
+ data.width = null
|
|
|
+}
|
|
|
+const infoFun = computed(() => {
|
|
|
+ return (data) => {
|
|
|
+ let customcheek = '',customcolors = '',custommaterial = '',length = '',width = ''
|
|
|
+ if (data.cheekschemeid > 0) customcheek = data.cheekschemedetails.filter(item => item.num == data.customcheek).length ? data.cheekschemedetails.filter(item => item.num == data.customcheek)[0].num : ''
|
|
|
+ if (data.colorschemeid > 0) customcolors = data.colorsschemedetails.filter(item => item.num == data.customcolors).length ? data.colorsschemedetails.filter(item => item.num == data.customcolors)[0].num : ''
|
|
|
+ if (data.materialschemeid > 0) custommaterial = data.materialschemedetails.filter(item => item.num == data.custommaterial).length ? data.materialschemedetails.filter(item => item.num == data.custommaterial)[0].num :''
|
|
|
+ if (data.spec == '自定义' || data.spec == 'custom') {
|
|
|
+ length = data.lengthschemedetails.filter(item => item.num == data.length).length ? data.lengthschemedetails.filter(item => item.num == data.length)[0].num : ''
|
|
|
+ width = data.widthschemedetails.filter(item => item.num == data.width).length ? data.widthschemedetails.filter(item => item.num == data.width)[0].num : ''
|
|
|
+ }
|
|
|
+ let result = ''
|
|
|
+ if (customcheek) result = result + customcheek + ','
|
|
|
+ if (customcolors) result = result + customcolors + ','
|
|
|
+ if (custommaterial) result = result + custommaterial + ','
|
|
|
+ if (length) result = result + length + ','
|
|
|
+ if (width) result = result + width + ','
|
|
|
+ return result
|
|
|
+ }
|
|
|
+})
|
|
|
const onModeClick = async (data)=>{
|
|
|
printUrl(data)
|
|
|
}
|
|
@@ -556,4 +589,16 @@ onMounted (()=>{
|
|
|
.mt-10{
|
|
|
margin-bottom:20px
|
|
|
}
|
|
|
+ .overflow {
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+</style>
|
|
|
+<style>
|
|
|
+.oder-modal .ant-modal-title {
|
|
|
+ display: flex !important;
|
|
|
+ justify-content: space-evenly !important;
|
|
|
+}
|
|
|
</style>
|