|
@@ -138,8 +138,8 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="原产国(地区):" name="originCountry">
|
|
|
- <a-select v-model:value="bodyData.originCountry" :disabled="isView" placeholder="请输入原产国(地区)" :options="originCountryOptions" show-search allow-clear option-filter-prop="label" />
|
|
|
+ <a-form-item label="原产国(地区):" name="originCountry">
|
|
|
+ <a-select v-model:value="bodyData.originCountry" :disabled="isView" placeholder="请输入原产国(地区)" :options="originCountryOptions" show-search allow-clear option-filter-prop="label" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -183,13 +183,13 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="毛重(KG):" name="grossWeight">
|
|
|
- <a-input-number v-model:value="bodyData.grossWeight" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入毛重(KG)" />
|
|
|
+ <a-form-item label="毛重(KG):" name="grossWeight">
|
|
|
+ <a-input-number v-model:value="bodyData.grossWeight" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入毛重(KG)" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="净重(KG):" name="netWeight">
|
|
|
- <a-input v-model:value="bodyData.netWeight" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入净重(KG)" />
|
|
|
+ <a-form-item label="净重(KG):" name="netWeight">
|
|
|
+ <a-input v-model:value="bodyData.netWeight" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入净重(KG)" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -353,7 +353,21 @@
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="商品编号:" name="productCode">
|
|
|
- <a-input v-model:value="productData.productCode" :disabled="isView" placeholder="请输入商品编号" allow-clear />
|
|
|
+ <a-select
|
|
|
+ v-model:value="productData.productCode"
|
|
|
+ placeholder="请选择商品编号"
|
|
|
+ style="width: 100%"
|
|
|
+ :filter-option="false"
|
|
|
+ :not-found-content="fetchingSp ? undefined : null"
|
|
|
+ :options="spOptions"
|
|
|
+ :show-search="true"
|
|
|
+ @search="fetchSp"
|
|
|
+ @change="onChangeSp"
|
|
|
+ >
|
|
|
+ <template v-if="fetchingSp" #notFoundContent>
|
|
|
+ <a-spin size="small" />
|
|
|
+ </template>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -373,17 +387,17 @@
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="人民币单价:" name="unitPrice">
|
|
|
- <a-input-number v-model:value="productData.unitPrice" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入人民币单价" />
|
|
|
+ <a-input v-model:value="productData.unitPrice" :disabled="isView" placeholder="请输入人民币单价" allow-clear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="商品数量:" name="quantity">
|
|
|
- <a-input v-model:value="productData.quantity" :disabled="isView" :precision="0" :min="0" style="width: 100%;" placeholder="请输入商品数量" />
|
|
|
+ <a-input-number v-model:value="productData.quantity" :disabled="isView" :precision="0" :min="0" style="width: 100%;" placeholder="请输入商品数量" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="计量单位:" name="measurementUnit">
|
|
|
- <a-select v-model:value="bodyData.measurementUnit" :disabled="isView" placeholder="请选择商品编号" :options="legalUnitOptions" show-search allow-clear option-filter-prop="label"/>
|
|
|
+ <a-input v-model:value="productData.measurementUnit" :disabled="true" placeholder="请选择商品编号" allow-clear/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -392,13 +406,13 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="境外进口料件总价(RMB):" name="importTotal">
|
|
|
- <a-input v-model:value="productData.importTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入境外进口料件总价(RMB)" />
|
|
|
+ <a-form-item label="境外进口料件总价(RMB):" name="importTotal">
|
|
|
+ <a-input v-model:value="productData.importTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入境外进口料件总价(RMB)" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="国内采购料件总价(RMB):" name="domesticTotal">
|
|
|
- <a-input v-model:value="productData.domesticTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入国内采购料件总价(RMB)" />
|
|
|
+ <a-form-item label="国内采购料件总价(RMB):" name="domesticTotal">
|
|
|
+ <a-input v-model:value="productData.domesticTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入国内采购料件总价(RMB)" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -439,9 +453,6 @@
|
|
|
<template v-if="column.dataIndex === 'regionCode'">
|
|
|
{{ $TOOL.dictTypeData('zgqdm', record.regionCode) }}
|
|
|
</template>
|
|
|
- <template v-if="column.dataIndex === 'measurementUnit'">
|
|
|
- {{ $TOOL.dictTypeData('measurement unit', record.legalUnit) }}
|
|
|
- </template>
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
<template v-if="isView">
|
|
|
<a-button type="link" primary size="small" @click="onProductReset(), productData = cloneDeep(record)">查看</a-button>
|
|
@@ -509,9 +520,10 @@
|
|
|
|
|
|
<script setup name="qyRecordInfoDetail">
|
|
|
import tool from '@/utils/tool'
|
|
|
-import {cloneDeep} from 'lodash-es'
|
|
|
+import {cloneDeep, debounce} from 'lodash-es'
|
|
|
import {required} from '@/utils/formRules'
|
|
|
import qyRecordInfoApi from '@/api/yqyc/qyRecordInfoApi'
|
|
|
+import qyRecordProductDictApi from '@/api/yqyc/qyRecordProductDictApi'
|
|
|
import {message, Modal} from "ant-design-vue";
|
|
|
import {createVNode} from "vue";
|
|
|
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
|
@@ -544,6 +556,8 @@ const legalUnitOptions = ref([])
|
|
|
const originCountryOptions = ref([])
|
|
|
const currencyOptions = ref([])
|
|
|
const regionCodeOptions = ref([])
|
|
|
+const spOptions = ref([])
|
|
|
+const fetchingSp = ref(false)
|
|
|
|
|
|
// 列表选择配置
|
|
|
const bodyOptions = {
|
|
@@ -631,7 +645,7 @@ const bodyRules = {
|
|
|
recordQuantity: [required('请输入备案数量')],
|
|
|
recordUnit: [required('请输入备案计量单位')],
|
|
|
legalUnit: [required('请输入法定计量单位')],
|
|
|
- originCountry: [required('请输入原产国(地区)')],
|
|
|
+ originCountry: [required('请输入原产国(地区)')],
|
|
|
recordPrice: [required('请输入备案单价')],
|
|
|
recordTotalPrice: [required('请输入备案总价')],
|
|
|
currency: [required('请输入币制')],
|
|
@@ -653,8 +667,8 @@ const productRules = {
|
|
|
quantity: [required('请输入商品数量')],
|
|
|
measurementUnit: [required('请输入计量单位')],
|
|
|
domesticSalePrice: [required('请输入成品内销人民币价格')],
|
|
|
- importTotal: [required('请输入境外进口料件总价(RMB)')],
|
|
|
- domesticTotal: [required('请输入国内采购料件总价(RMB)')],
|
|
|
+ importTotal: [required('请输入境外进口料件总价(RMB)')],
|
|
|
+ domesticTotal: [required('请输入国内采购料件总价(RMB)')],
|
|
|
}
|
|
|
const bodyColumns = [
|
|
|
{
|
|
@@ -700,7 +714,7 @@ const bodyColumns = [
|
|
|
width: 160
|
|
|
},
|
|
|
{
|
|
|
- title: '原产国(地区)',
|
|
|
+ title: '原产国(地区)',
|
|
|
dataIndex: 'originCountry',
|
|
|
width: 140
|
|
|
},
|
|
@@ -745,12 +759,12 @@ const bodyColumns = [
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- title: '毛重(KG)',
|
|
|
+ title: '毛重(KG)',
|
|
|
dataIndex: 'grossWeight',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
- title: '净重(KG)',
|
|
|
+ title: '净重(KG)',
|
|
|
dataIndex: 'netWeight',
|
|
|
width: 120
|
|
|
},
|
|
@@ -860,7 +874,7 @@ const productColumns = [
|
|
|
{
|
|
|
title: '加工增值核算备案编号',
|
|
|
dataIndex: 'recordNumber',
|
|
|
- width: 160
|
|
|
+ width: 180
|
|
|
},
|
|
|
{
|
|
|
title: '主管关区代码',
|
|
@@ -908,24 +922,24 @@ const productColumns = [
|
|
|
width: 180
|
|
|
},
|
|
|
{
|
|
|
- title: '境外进口料件总价(RMB)',
|
|
|
+ title: '境外进口料件总价(RMB)',
|
|
|
dataIndex: 'importTotal',
|
|
|
- width: 180
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
- title: '国内采购料件总价(RMB)',
|
|
|
+ title: '国内采购料件总价(RMB)',
|
|
|
dataIndex: 'domesticTotal',
|
|
|
- width: 180
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
title: '自主核算产品收益占比',
|
|
|
dataIndex: 'selfRatio',
|
|
|
- width: 180
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
title: '企业自主核算加工增值率',
|
|
|
dataIndex: 'selfRate',
|
|
|
- width: 180
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
title: '备注',
|
|
@@ -1089,7 +1103,6 @@ const deleteBatchBody = () => {
|
|
|
}
|
|
|
const onProductReset = () => {
|
|
|
productFormRef.value?.resetFields()
|
|
|
- debugger
|
|
|
productData.value = {
|
|
|
companyApplyCode: userInfo.companyNumber,
|
|
|
companyName: userInfo.companyName
|
|
@@ -1267,6 +1280,35 @@ const onChangeOutAccountCumulativeAmount = () => {
|
|
|
}
|
|
|
}, 100)
|
|
|
}
|
|
|
+let lastFetchId = 0;
|
|
|
+const fetchSp = debounce(value => {
|
|
|
+ lastFetchId += 1;
|
|
|
+ const fetchId = lastFetchId;
|
|
|
+ spOptions.value = [];
|
|
|
+ fetchingSp.value = true;
|
|
|
+ qyRecordProductDictApi.qyRecordProductDictPage({
|
|
|
+ current: 1,
|
|
|
+ size: 10000,
|
|
|
+ productCode: value
|
|
|
+ }).then((res) => {
|
|
|
+ if (fetchId !== lastFetchId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const arr = res.records.map(v => {
|
|
|
+ v.label = v.productName
|
|
|
+ v.value = v.productCode
|
|
|
+ return v
|
|
|
+ });
|
|
|
+ spOptions.value = arr
|
|
|
+ fetchingSp.value = false
|
|
|
+ })
|
|
|
+}, 300);
|
|
|
+const onChangeSp = (val, obj) => {
|
|
|
+ productData.value.productName = obj.productName
|
|
|
+ productData.value.version = 1
|
|
|
+ productData.value.hsCode = val
|
|
|
+ productData.value.measurementUnit = obj.firstUnitCode + '-' + obj.firstUnitName
|
|
|
+}
|
|
|
// 抛出函数
|
|
|
defineExpose({
|
|
|
onOpen
|