@@ -289,8 +294,8 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 校验数据 */
const verifyData = async () => {
- if (queryParams.yearsMonthStr==''||queryParams.yearsMonthStr==null) {
- message.error('请选择年月')
+ if (queryParams.versionNumber==null) {
+ message.error('请选择版本号')
return
}
if (queryParams.supplierCode==''||queryParams.supplierCode==null) {
@@ -301,27 +306,29 @@ const verifyData = async () => {
message.error('请上传文件')
return
}
- const data = await SuppliperMoldCostMainApi.verifyDataExist(queryParams.yearsMonthStr,queryParams.supplierCode);
- console.log('data',data)
- if(data.status==0){
- submitForm();
- }else if(data.status==2){
- try {
- // 确认
- await message.confirm('已经存在相同的供应商代码及年月的供应商模具费用,是否确认导入?')
- //确定走的
- submitForm();
- // await PurchasepriceApi.deletePurchaseprice(id)
- // tableObject.loading = false
- // message.success(t('common.delSuccess'))
- // // 刷新列表
- // buttonBaseClick('refresh',null)
- } catch {
- //取消走的
- }
- }else if(data.status==3){
- await message.alertWarning('已存在相同供应商编号及年月的对账单,且已提交,无法导入。')
- }
+ submitForm();
+ // const data = await SuppliperMoldCostMainApi.verifyDataExist(queryParams.versionNumber,queryParams.supplierCode);
+
+ // console.log('data',data)
+ // if(data.status==0){
+
+ // }else if(data.status==2){
+ // try {
+ // // 确认
+ // await message.confirm('已经存在相同的供应商代码及年月的供应商模具费用,是否确认导入?')
+ // //确定走的
+ // submitForm();
+ // // await PurchasepriceApi.deletePurchaseprice(id)
+ // // tableObject.loading = false
+ // // message.success(t('common.delSuccess'))
+ // // // 刷新列表
+ // // buttonBaseClick('refresh',null)
+ // } catch {
+ // //取消走的
+ // }
+ // }else if(data.status==3){
+ // await message.alertWarning('已存在相同供应商编号及年月的对账单,且已提交,无法导入。')
+ // }
}
/** 提交表单 */
@@ -414,7 +421,7 @@ const submitFormError = (): void => {
/** 重置表单 */
const resetForm = () => {
queryParams.supplierCode = ''
- queryParams.yearsMonthStr = ''
+ queryParams.versionNumber = 0
// 重置上传状态和文件
formLoading.value = false
uploadRef.value?.clearFiles()
@@ -434,14 +441,14 @@ const importTemplate = () => {
const customerList = ref();
const queryParams = reactive({
supplierCode: '',
- yearsMonthStr: '',
+ versionNumber: 0,
})
const rules = ref({
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' },
],
- yearsMonthStr: [
- { required: true, message: '请选择年月', trigger: 'change' },
+ versionNumber: [
+ { required: true, message: '请选择版本号', trigger: 'change' },
],
})
const getCustomerList = async () => {//获取客户列表
diff --git a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue
index 40c492941..1ee730a9f 100644
--- a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue
+++ b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/index.vue
@@ -57,8 +57,13 @@
}]"
:apiPage="SuppliperMoldCostDetailApi.getSupplierMoldCostDetailPage"
:detailButtonIsShowAdd="false"
+ :detailButtonIsShowEdit="false"
+ :detailButtonIsShowDelete="false"
+ :buttondataTable="buttondataTable"
:otherHeadButttonData = "[]"
@buttonBaseClick="detailButtonBaseClick"
+ @tableFormButton="tableFormButton"
+
/>
{
if (val == 'import') {
@@ -226,8 +250,18 @@ const buttonBaseClick = (val, item) => {
}
-
- /** 详情操作 */
+ // 点击详情列表列按钮回调事件
+ const tableFormButton = async (val , row) => {
+ if (val == 'close') { // 点击关闭
+ await SuppliperMoldCostMainApi.close(row.id)
+ detailRef.value.getList();
+ }else if(val=='reOpen'){
+ await SuppliperMoldCostMainApi.reOpen(row.id)
+ detailRef.value.getList();
+ }
+
+ }
+/** 详情操作 */
const detailRef = ref()
const tableObjectExtend = ref([])
const openDetail = (row: any, titleName: any, titleValue: any) => {
diff --git a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts
index e94af8281..878d3bd91 100644
--- a/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts
+++ b/src/views/wms/deliversettlementManage/moldAllocation/supplierMoldCostMain/supplierMoldCostMain.data.ts
@@ -29,12 +29,7 @@ export const SupplierMoldCostMain = useCrudSchemas(reactive([
}
},
},
- {
- label: '版本号',
- field: 'versionNumber',
- sort: 'custom',
- isTable: false
- },
+
{
label: '供应商代码',
field: 'supplierCode',
@@ -73,6 +68,12 @@ export const SupplierMoldCostMain = useCrudSchemas(reactive([
}
}
},
+ {
+ label: '版本号',
+ field: 'versionNumber',
+ sort: 'custom',
+ isTable: true
+ },
{
label: '创建者',
field: 'creator',
@@ -174,6 +175,7 @@ export const SupplierMoldCostDetail = useCrudSchemas(reactive([
label: '状态',
field: 'status',
sort: 'custom',
+ isDetail:false,
dictType: DICT_TYPE.SUPPLIER_TOOL_APPORT_STATEMENT_DETAIL,
dictClass: 'string',
form: {
@@ -181,6 +183,17 @@ export const SupplierMoldCostDetail = useCrudSchemas(reactive([
component: 'Select',
},
},
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ isTable:true,
+ isDetail:false,
+ table: {
+ width: 180,
+ fixed: 'right'
+ }
+ }
]))