Commit 77a2f776 by linjinhong

fix:修改复制取值和样式

parent a6c13734
......@@ -834,7 +834,7 @@ onMounted(() => {
clearable
filterable
popper-class="customize-select-style"
style="width: 150px"
style="width: 180px"
>
<ElOption
v-for="(item, index) in platformJson"
......@@ -931,8 +931,12 @@ onMounted(() => {
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :value="false">单件</el-radio-button>
<el-radio-button :value="true">多件</el-radio-button>
<el-radio-button :value="false" class="radioBtn"
>单件</el-radio-button
>
<el-radio-button :value="true" class="radioBtn"
>多件</el-radio-button
>
</el-radio-group>
</ElFormItem>
<ElFormItem>
......@@ -1328,4 +1332,9 @@ onMounted(() => {
}
}
}
.radioBtn {
::v-deep .el-radio-button__inner {
width: 75px;
}
}
</style>
......@@ -870,7 +870,7 @@ onMounted(() => {
clearable
filterable
placeholder="请输入"
style="width: 150px"
style="width: 180px"
>
<el-option
v-for="item in warehouseList"
......@@ -971,8 +971,12 @@ onMounted(() => {
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :value="false">单件</el-radio-button>
<el-radio-button :value="true">多件</el-radio-button>
<el-radio-button :value="false" class="radioBtn"
>单件</el-radio-button
>
<el-radio-button :value="true" class="radioBtn"
>多件</el-radio-button
>
</el-radio-group>
</ElFormItem>
<ElFormItem>
......@@ -1425,4 +1429,9 @@ onMounted(() => {
}
}
}
.radioBtn {
::v-deep .el-radio-button__inner {
width: 75px;
}
}
</style>
......@@ -167,7 +167,7 @@
v-model.trim="searchForm.thirdSkuCode"
placeholder="库存SKU"
clearable
style="width: 150px"
style="width: 180px"
></ElInput>
</ElFormItem>
<ElFormItem label="款号" v-if="status !== 'BATCH_DOWNLOAD'">
......@@ -244,8 +244,12 @@
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :value="false">单件</el-radio-button>
<el-radio-button :value="true">多件</el-radio-button>
<el-radio-button :value="false" class="radioBtn"
>单件</el-radio-button
>
<el-radio-button :value="true" class="radioBtn"
>多件</el-radio-button
>
</el-radio-group>
</ElFormItem>
<ElFormItem v-if="status !== 'BATCH_DOWNLOAD'">
......@@ -4587,15 +4591,24 @@ const rightChange = async (code: string) => {
navigator.clipboard.writeText(str)
ElMessage.success('复制成功')
} else if (code === 'factorySubOrderNumber') {
const str = (tableData.value as (ProductList | PodCnOrderListData)[])
.flatMap(
(item) =>
(item as PodCnOrderListData)?.productList
?.map((product) => product.factorySubOrderNumber)
?.filter(Boolean) ?? [],
)
.filter(Boolean)
.join(',')
let str
if (flat) {
str = (tableData.value as (ProductList | PodCnOrderListData)[])
.flatMap(
(item) =>
(item as PodCnOrderListData)?.productList
?.map((product) => product.factorySubOrderNumber)
?.filter(Boolean) ?? [],
)
.filter(Boolean)
.join(',')
} else {
str = (tableData.value as ProductList[])
.map((item) => item?.factorySubOrderNumber)
.filter(Boolean)
.join(',')
}
if (!str) return ElMessage.warning('当前数据没有生产单号')
navigator.clipboard.writeText(str)
ElMessage.success('复制成功')
......@@ -6225,6 +6238,11 @@ useEnterKeyTrigger({
font-size: 12px;
}
}
.radioBtn {
::v-deep .el-radio-button__inner {
width: 75px;
}
}
</style>
<style lang="scss">
.customize-select-style {
......
......@@ -132,7 +132,7 @@
<LogisticsWaySelect
v-model="searchForm.craftCode"
:company-list="craftList"
:start-width="'178px'"
:start-width="'150px'"
search-placeholder="搜索工艺名称"
start-placeholder="请选择工艺名称"
></LogisticsWaySelect>
......@@ -142,7 +142,7 @@
v-model.trim="searchForm.thirdSkuCode"
placeholder="库存SKU"
clearable
style="width: 150px"
style="width: 180px"
></ElInput>
</ElFormItem>
<ElFormItem label="款号" v-if="status !== 'BATCH_DOWNLOAD'">
......@@ -234,8 +234,12 @@
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :label="false">单件</el-radio-button>
<el-radio-button :label="true">多件</el-radio-button>
<el-radio-button :label="false" class="radioBtn"
>单件</el-radio-button
>
<el-radio-button :label="true" class="radioBtn"
>多件</el-radio-button
>
</el-radio-group>
</ElFormItem>
<ElFormItem>
......@@ -5181,25 +5185,37 @@ const rightChange = async (code: string) => {
} else if (code === 'copy_shopNumber') {
const str = (tableData.value as ProductList[] | PodUsOrderListData[])
.map((item) => item?.shopNumber)
.join()
.filter(Boolean)
.join(',')
if (!str) return ElMessage.warning('当前数据没有店铺单号')
navigator.clipboard.writeText(str)
ElMessage.success('复制成功')
} else if (code === 'order-number') {
const str = (tableData.value as ProductList[] | PodUsOrderListData[])
.map((item) => item?.factoryOrderNumber)
.join()
.filter(Boolean)
.join(',')
if (!str) return ElMessage.warning('当前数据没有订单号')
navigator.clipboard.writeText(str)
ElMessage.success('复制成功')
} else if (code === 'factorySubOrderNumber') {
const str = (tableData.value as ProductList[] | PodUsOrderListData[])
.map((item) =>
(item as PodUsOrderListData)?.productList?.map(
(el) => el.factorySubOrderNumber,
),
)
.join()
let str
if (flat) {
str = (tableData.value as (ProductList | PodUsOrderListData)[])
.flatMap(
(item) =>
(item as PodUsOrderListData)?.productList
?.map((product) => product.factorySubOrderNumber)
?.filter(Boolean) ?? [],
)
.filter(Boolean)
.join(',')
} else {
str = (tableData.value as ProductList[])
.map((item) => item?.factorySubOrderNumber)
.filter(Boolean)
.join(',')
}
if (!str) return ElMessage.warning('当前数据没有生产单号')
navigator.clipboard.writeText(str)
ElMessage.success('复制成功')
......@@ -7234,6 +7250,11 @@ const printNormal = async () => {
font-size: 12px;
}
}
.radioBtn {
::v-deep .el-radio-button__inner {
width: 75px;
}
}
</style>
<style lang="scss">
.customize-select-style {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment