Browse Source

结算出库对于已完成状态单据增加作废按钮,作废同时进行WMS库存归还,状态标记作废,作废接口传递三个动作,并且作废状态不能重新打开

hella_online_20240829
李达明 4 months ago
parent
commit
105658ea37
  1. 6
      src/api/wms/saleShipmentMain/index.ts
  2. 5
      src/utils/dict.ts
  3. 13
      src/utils/disposition/defaultButtons.ts
  4. 48
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

6
src/api/wms/saleShipmentMain/index.ts

@ -98,3 +98,9 @@ export const agree = async (id) => {
export const handle = async (id) => { export const handle = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id }) return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id })
} }
// 处理-结算出库废弃
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/abort?id=` + id })
}

5
src/utils/dict.ts

@ -322,9 +322,8 @@ export enum DICT_TYPE {
CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因 CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因
QMS_CODE = 'qms_code', // 质量通知代码 QMS_CODE = 'qms_code', // 质量通知代码
DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置 DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置
DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型 DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因
// ========== 业务 - mes -gaojs ========== // ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status', //质检状态 QUALIFY_STATUS = 'qualify_status', //质检状态

13
src/utils/disposition/defaultButtons.ts

@ -645,6 +645,19 @@ export function mainListHandleBtn(option: any) {
}) })
} }
// 主列表-申请流程-作废按钮
export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.终止`).replace('ts.', ''),
name: 'mainAbort',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-发布按钮 // 主列表-订单流程-发布按钮
export function mainListOrderPubBtn(option: any) { export function mainListOrderPubBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {

48
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -121,13 +121,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
val.forEach(item=>{ val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['soLine'] = item['lineNumber'] newRow['soLine'] = item['lineNumber']
newRow['soNumber'] = item['number'] newRow['soNumber'] = item['number']
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
newRow['projectCode'] = item['projectCode'] newRow['projectCode'] = item['projectCode']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
}else if(formField == 'fromLocationCode'){ }else if(formField == 'fromLocationCode'){
row['fromLocationCode'] = val[0]['defaultLocationCode'] row['fromLocationCode'] = val[0]['defaultLocationCode']
}else{ }else{
@ -135,7 +135,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}else { }else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'CustomerCode') { if(formField == 'CustomerCode') {
setV['CustomerCode'] = val[0]['CustomerCode'] setV['CustomerCode'] = val[0]['CustomerCode']
} else { } else {
@ -152,7 +152,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const setV = {} const setV = {}
if(formField == 'soLine') { if(formField == 'soLine') {
setV['soLine'] = val[0]['lineNumber'] setV['soLine'] = val[0]['lineNumber']
setV['soNumber'] = val[0]['number'] setV['soNumber'] = val[0]['number']
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
@ -235,22 +235,23 @@ const butttondata = (row,$index) => {
if(findIndex>-1&&findIndex<$index){ if(findIndex>-1&&findIndex<$index){
return [] return []
} }
return [ return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','4']),hasPermi:'wms:sale-shipment-main-request:update'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','4']),hasPermi:'wms:sale-shipment-main-request:update'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // defaultButtons.mainListAbortBtn({hide:isShowMainButton(row,['8']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
] // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
]
} }
const tableData = ref([]) const tableData = ref([])
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
@ -307,7 +308,7 @@ const buttonTableClick = async (val, row) => {
console.log(err) console.log(err)
}) })
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await message.confirm('确认要 处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
SaleShipmentMainApi.handle(row.masterId).then(() => { SaleShipmentMainApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
@ -317,7 +318,18 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'edit') { // } else if (val == 'mainAbort') { //
await message.confirm('确认要终止吗?')
tableObject.loading = true
SaleShipmentMainApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -327,7 +339,7 @@ const buttonTableClick = async (val, row) => {
/** /**
* 详情 编辑页面打开 * 详情 编辑页面打开
* @param row * @param row
*/ */
const detailOpenForm = (type) => { const detailOpenForm = (type) => {

Loading…
Cancel
Save