|
@ -45,6 +45,8 @@ |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formRef" |
|
|
ref="formRef" |
|
|
|
|
|
:isOpenSearchTable="true" |
|
|
|
|
|
:indexTableColumn="3" |
|
|
@success="getList" |
|
|
@success="getList" |
|
|
:rules="SupplierdeliverRequestMainRules" |
|
|
:rules="SupplierdeliverRequestMainRules" |
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" |
|
@ -99,6 +101,18 @@ |
|
|
@submitForm="submitFormLabel" |
|
|
@submitForm="submitFormLabel" |
|
|
:isShowReduceButton="false" |
|
|
:isShowReduceButton="false" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<!-- 上传质量报告 --> |
|
|
|
|
|
<BasicForm |
|
|
|
|
|
ref="ploadQualityReportRef" |
|
|
|
|
|
@success="getList" |
|
|
|
|
|
:formAllSchemas="UploadQualityReport.allSchemas" |
|
|
|
|
|
:tableAllSchemas="UploadQualityReport.allSchemas" |
|
|
|
|
|
:tableData="ploadQualityReportTableData" |
|
|
|
|
|
@handleAddTable="handleAddTableUploadQualityReport" |
|
|
|
|
|
@handleDeleteTable="handleDeleteTableUploadQualityReport" |
|
|
|
|
|
@submitForm="submitFormUploadQualityReport" |
|
|
|
|
|
:isShowReduceButton="true" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -112,6 +126,7 @@ import { |
|
|
SupplierdeliverRequestDetail, |
|
|
SupplierdeliverRequestDetail, |
|
|
SupplierdeliverRequestDetailRules, |
|
|
SupplierdeliverRequestDetailRules, |
|
|
SupplierdeliverRequestDetailLabel, |
|
|
SupplierdeliverRequestDetailLabel, |
|
|
|
|
|
UploadQualityReport |
|
|
} from './supplierdeliverRequestMain.data' |
|
|
} from './supplierdeliverRequestMain.data' |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
@ -138,17 +153,28 @@ const planArriveTimeStr = ref() |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
|
|
|
console.log("type:",type) |
|
|
console.log("formField:",formField) |
|
|
console.log("formField:",formField) |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
// row[formField] = val[0][searchField] |
|
|
if (formField == 'poNumber') { |
|
|
// if (formField == 'poNumber') { |
|
|
row['poNumber'] = val[0]['poNumber'] |
|
|
// row['poNumber'] = val[0]['poNumber'] |
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
// row['itemCode'] = val[0]['itemCode'] |
|
|
row['poLine'] = val[0]['poLine'] |
|
|
// row['poLine'] = val[0]['poLine'] |
|
|
row['orderQty'] = val[0]['orderQty'] |
|
|
// row['orderQty'] = val[0]['orderQty'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
// row['uom'] = val[0]['uom'] |
|
|
} |
|
|
// } |
|
|
|
|
|
val.forEach(item=>{ |
|
|
|
|
|
const newRow = {...row} |
|
|
|
|
|
newRow[formField] = item[searchField] |
|
|
|
|
|
newRow['poNumber'] = item['poNumber'] |
|
|
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
|
|
newRow['poLine'] = item['poLine'] |
|
|
|
|
|
newRow['orderQty'] = item['orderQty'] |
|
|
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
|
|
tableData.value.push(newRow) |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
@ -283,6 +309,7 @@ const isShowMainButtonLabel = (row, val) => { |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
|
|
|
defaultButtons.mainListPlanUploadQualityReportBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
@ -326,6 +353,9 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainPurPlanClo') { |
|
|
} else if (val == 'mainPurPlanClo') { |
|
|
// 关闭 |
|
|
// 关闭 |
|
|
handleClo(row.id) |
|
|
handleClo(row.id) |
|
|
|
|
|
} else if (val == 'mainPlanUploadQualityReport') { |
|
|
|
|
|
// 上传质量报告 |
|
|
|
|
|
handleUploadQualityReport(row.id) |
|
|
} else if (val == 'mainPlanSub') { |
|
|
} else if (val == 'mainPlanSub') { |
|
|
// 提交审批 |
|
|
// 提交审批 |
|
|
handleSub(row.id) |
|
|
handleSub(row.id) |
|
@ -466,6 +496,38 @@ const handleOpe = async (id: number) => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const ploadQualityReportRef = ref() |
|
|
|
|
|
const ploadQualityReportTableData = ref([]) |
|
|
|
|
|
/** 上传质量报告 */ |
|
|
|
|
|
const handleUploadQualityReport = async (id: number) => { |
|
|
|
|
|
console.log('UploadQualityReport',UploadQualityReport.allSchemas) |
|
|
|
|
|
// ploadQualityReportRef.value.dialogVisible = true |
|
|
|
|
|
ploadQualityReportRef.value.open('create', null, null,'上传质量报告')//创建标签页面 createLabel 标题 |
|
|
|
|
|
const tableFormKeys = {} |
|
|
|
|
|
UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => { |
|
|
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
|
|
}) |
|
|
|
|
|
ploadQualityReportTableData.value = [tableFormKeys] |
|
|
|
|
|
} |
|
|
|
|
|
const handleAddTableUploadQualityReport = ()=>{ |
|
|
|
|
|
const tableFormKeys = {} |
|
|
|
|
|
UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => { |
|
|
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
|
|
}) |
|
|
|
|
|
ploadQualityReportTableData.value.push(tableFormKeys) |
|
|
|
|
|
} |
|
|
|
|
|
const handleDeleteTableUploadQualityReport = (item, index) => { |
|
|
|
|
|
ploadQualityReportTableData.value.splice(index, 1) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const submitFormUploadQualityReport = (formType, data) => { |
|
|
|
|
|
console.log("formType==",formType) |
|
|
|
|
|
console.log("data==",data) |
|
|
|
|
|
ploadQualityReportRef.value.dialogVisible = false |
|
|
|
|
|
// formLabelRef.value.formLoading = false |
|
|
|
|
|
// formLabelRef.value.dialogVisible = false |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 提交审批按钮操作 */ |
|
|
/** 提交审批按钮操作 */ |
|
|
const handleSub = async (id: number) => { |
|
|
const handleSub = async (id: number) => { |
|
|