Browse Source

BUG修改

master
parent
commit
bd9a1c24b5
  1. 1
      src/components/BasicForm/src/BasicForm.vue
  2. 4
      src/components/Detail/src/Detail.vue
  3. 2
      src/components/SearchTable/src/SearchTable.vue
  4. 10
      src/views/eam/item/adjustRecord/index.vue
  5. 10
      src/views/eam/item/applicationRecord/index.vue
  6. 10
      src/views/eam/item/countRecord/index.vue
  7. 8
      src/views/eam/item/countadjustPlan/index.vue
  8. 11
      src/views/eam/item/countadjustWork/index.vue
  9. 65
      src/views/eam/item/itemApplyMain/index.vue
  10. 109
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  11. 8
      src/views/eam/item/itemOrderMain/index.vue
  12. 2
      src/views/eam/item/replaceItemDes/index.vue
  13. 22
      src/views/eam/item/transaction/transaction.data.ts

1
src/components/BasicForm/src/BasicForm.vue

@ -419,6 +419,7 @@ const submitForm = async () => {
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
console.log('isBusiness0',props.isBusiness)
//
if (props.isBusiness) {
formLoading.value = true

4
src/components/Detail/src/Detail.vue

@ -511,7 +511,7 @@ const submitForm = async (formType, data) => {
try {
const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return
emit('detailSubmitForm', formType, data, getList, formRef.value)
emit('detailSubmitForm', formType, data, getList(), formRef.value)
} finally {
// formRef.value.formLoading = false
}
@ -581,7 +581,7 @@ const openImage = (item) => {
emit('openImage', item)
}
defineExpose({ openDetail, tableObject }) // open
defineExpose({ openDetail, tableObject , getList }) // open
//
watch(
() => props.apiPage,

2
src/components/SearchTable/src/SearchTable.vue

@ -165,7 +165,7 @@ const submitForm = async () => {
}
const onMountedCallBack = ($event,a,b)=>{
debugger
}
</script>

10
src/views/eam/item/adjustRecord/index.vue

@ -38,7 +38,9 @@
:detailAllSchemas="AdjustRecordDetail.allSchemas" :detailAllSchemasRules="AdjustRecordDetailRules"
:apiCreate="AdjustRecordDetailApi.createAdjustRecordDetail" :apiUpdate="AdjustRecordDetailApi.updateAdjustRecordDetail"
:apiPage="AdjustRecordDetailApi.getAdjustRecordDetailPage" :apiDelete="AdjustRecordDetailApi.deleteAdjustRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"/>
<!-- 导入 -->
<ImportForm
@ -116,9 +118,9 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

10
src/views/eam/item/applicationRecord/index.vue

@ -43,7 +43,9 @@
:apiUpdate="ApplicationRecordDetailApi.updateApplicationRecordDetail"
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage"
:apiDelete="ApplicationRecordDetailApi.deleteApplicationRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true" />
<!-- 审批详情 -->
<approveDetail ref="detailRef1" :isBasic="false" :allSchemas="ApplicationRecordMain.allSchemas"
:detailAllSchemas="ApplicationRecordDetail.allSchemas" :detailAllSchemasRules="ApplicationRecordDetailRules"
@ -127,9 +129,9 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

10
src/views/eam/item/countRecord/index.vue

@ -38,7 +38,9 @@
:detailAllSchemas="CountRecordDetail.allSchemas" :detailAllSchemasRules="CountRecordDetailRules"
:apiCreate="CountRecordDetailApi.createCountRecordDetail" :apiUpdate="CountRecordDetailApi.updateCountRecordDetail"
:apiPage="CountRecordDetailApi.getCountRecordDetailPage" :apiDelete="CountRecordDetailApi.deleteCountRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"/>
<!-- 导入 -->
<ImportForm
@ -116,9 +118,9 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

8
src/views/eam/item/countadjustPlan/index.vue

@ -100,8 +100,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:countadjustPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:countadjustPlan:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'eam:countadjustPlan:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:countadjustPlan:delete'}), //
]
// -

11
src/views/eam/item/countadjustWork/index.vue

@ -37,8 +37,9 @@
:detailAllSchemas="CountJobDetail.allSchemas" :detailAllSchemasRules="CountJobDetailRules"
:apiCreate="CountJobDetailApi.createCountJobDetail" :apiUpdate="CountJobDetailApi.updateCountJobDetail"
:apiPage="CountJobDetailApi.getCountJobDetailPage" :apiDelete="CountJobDetailApi.deleteCountJobDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/countJobDetail/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
@ -111,9 +112,9 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

65
src/views/eam/item/itemApplyMain/index.vue

@ -38,7 +38,10 @@
:detailAllSchemas="ItemApplyDetail.allSchemas" :detailAllSchemasRules="ItemApplyDetailRules"
:apiCreate="ItemApplyDetailApi.createItemApplyDetail" :apiUpdate="ItemApplyDetailApi.updateItemApplyDetail"
:apiPage="ItemApplyDetailApi.getItemApplyDetailPage" :apiDelete="ItemApplyDetailApi.deleteItemApplyDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail" @detailSubmitForm='detailSubmitForm'
:isShowAddBtn="isShowAddBtn"
:detailButtonIsShow="detailButtonIsShow"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@ -61,6 +64,8 @@
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const isShowAddBtn = ref(true)
const detailButtonIsShow = ref(false)
routeName.value = route.name
const tableColumns = ref(ItemApplyMain.allSchemas.tableColumns)
@ -76,6 +81,19 @@
console.log(formField);
//
if (formField == 'itemNumber') {
let subList = tableData.value
let flag = false;
if (subList.length > 0) {
subList.forEach((item) => {
if (item.itemNumber == val[0]['itemNumber']) {
flag = true;
}
})
}
if (flag) {
message.warning("物料编号已经存在");
return;
}
row[formField] = val[0][searchField]
row['itemNumber'] = val[0]['itemNumber']
row['isRadeIn'] = val[0]['isInAccount']
@ -96,14 +114,15 @@
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
// if(formField == 'itemCode'){
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
setV[formField] = val[0][searchField]
if (formField == 'itemNumber') {
setV['itemNumber'] = val[0]['itemNumber']
setV['isRadeIn'] = val[0]['isInAccount']
setV['currentQty'] = val[0]['qty']
setV['available'] = val[0]['available']
} else if (formField == 'deviceNumber') {
setV['deviceNumber'] = val[0]['number']
}
formRef.setValues(setV)
})
}
@ -122,8 +141,8 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -207,6 +226,13 @@
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
if(row.status!='0'){
isShowAddBtn.value=false
detailButtonIsShow.value=true
}else{
isShowAddBtn.value=true
detailButtonIsShow.value=false
}
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemApplyMain')
}
@ -307,6 +333,23 @@
}
getList() //
}
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => {
try { if (formType === 'create') {
await ItemApplyDetailApi.createItemApplyDetail(data)
message.success(t('common.createSuccess'))
formRef.dialogVisible = false
formRef.getList
} else {
await ItemApplyDetailApi.updateItemApplyDetail(data)
message.success(t('common.updateSuccess'))
formRef.dialogVisible = false
formRef.getList
} }catch {
} finally {
formRef.formLoading = false
}
}
/** 初始化 **/
onMounted(async () => {

109
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -42,6 +42,23 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_APPLY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: false
}
},
{
label: '描述',
field: 'name',
@ -121,6 +138,22 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择备件编号',
searchField: 'number',
searchTitle: '备件信息',
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},]
}
}
},
{
label: '类型',
@ -163,6 +196,26 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: "TRUE",
isMainValue: false
}, {
key: 'type',
value: "type",
isMainValue: true
}]
}
}
},
{
label: '申领数量',
@ -194,11 +247,13 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 2
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 2
@ -238,8 +293,13 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '备注',
field: 'remark',
@ -263,53 +323,14 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const ItemApplyDetailRules = reactive({
lineNumber: [
{ required: true, message: '请输入行号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
itemNumber: [
{ required: true, message: '请选择备件编号', trigger: 'change' }
],
stdPackQty: [
{ required: true, message: '请输入标包数量', trigger: 'blur' }
],
stdPackUnit: [
{ required: true, message: '请选择标包单位', trigger: 'change' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
taxRate: [
{ required: true, message: '请输入税率', trigger: 'blur' }
],
shippedQty: [
{ required: true, message: '请输入已发货数量', trigger: 'blur' }
],
receivedQty: [
{ required: true, message: '请输入已收货数量', trigger: 'blur' }
],
returnedQty: [
{ required: true, message: '请输入已退货数量', trigger: 'blur' }
],
putawayQty: [
{ required: true, message: '请输入已上架数量', trigger: 'blur' }
],
overReceivingPercent: [
{ required: true, message: '请输入超收百分比', trigger: 'blur' }
],
orderQty: [
{ required: true, message: '请输入订单数量', trigger: 'blur' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
qty: [
{ required: true, message: '请输入申领数量', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
nuumber: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

8
src/views/eam/item/itemOrderMain/index.vue

@ -112,9 +112,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -157,8 +155,8 @@
const butttondata = (row) => {
return [
defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
// defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
]
}

2
src/views/eam/item/replaceItemDes/index.vue

@ -25,12 +25,10 @@
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="basicFormRef" @success="formsSuccess" :rules="ReplaceItemDesRules"
:formAllSchemas="ReplaceItemDes.allSchemas" :apiUpdate="ReplaceItemDesApi.updateReplaceItemDes"
:apiCreate="ReplaceItemDesApi.createReplaceItemDes" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ReplaceItemDes.allSchemas" />

22
src/views/eam/item/transaction/transaction.data.ts

@ -10,13 +10,6 @@ export const Rules = reactive({
})
export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '事务编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '备件编号',
field: 'itemNumber',
@ -59,20 +52,11 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
},
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'Radio'
},
@ -81,13 +65,13 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
label: '计量单位',
field: 'uom',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
label: '操作',

Loading…
Cancel
Save