Commit 77a2f776 by linjinhong

fix:修改复制取值和样式

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