add:成品报废审核

This commit is contained in:
2023-11-16 09:43:47 +08:00
parent f826b0ba77
commit 87e99fadd6
11 changed files with 308 additions and 5 deletions

View File

@@ -80,6 +80,19 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="warning"
:permission="permission"
:disabled="work_flag"
:loading="loading_button"
icon="el-icon-check"
size="mini"
@click="onSubmit"
>
提交
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -259,6 +272,16 @@ export default {
checkboxT(row) {
return row.bill_status !== '99'
},
onSubmit() {
this.loading_button = true
productscrap.onSubmit(this.currentRow).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.loading_button = false
}).catch(() => {
this.loading_button = false
})
},
auditPass() {
this.loading_button = true
productscrap.auditPass(this.currentRow).then(res => {

View File

@@ -52,4 +52,11 @@ export function auditOut(data) {
data
})
}
export default { add, edit, del, getOutBillDtl, auditPass, auditOut }
export function onSubmit(data) {
return request({
url: '/api/productscrap/onSubmit',
method: 'post',
data
})
}
export default { add, edit, del, getOutBillDtl, auditPass, auditOut, onSubmit }

View File

@@ -262,11 +262,30 @@ export default {
// this.crud.resetQuery(true)
},
moneySubmit() {
var isTest = this.isTest(this.formMst.order_number)
if (isTest) {
if (this.formMst.car_type === '') {
this.crud.notify('请选择车型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
}
checkoutbill.moneySubmit(this.formMst).then(res => {
this.crud.notify('保存成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.toQuery()
this.close()
})
},
isTest(val) {
// 包含至少一个数字和字母正则
const regPost1 = /^(?![^a-zA-Z]+$)(?!\D+$)/g
// 包含至少一个汉字正则
const regPost2 = /.*[\u4e00-\u9fa5]+.*$/g
if (regPost1.test(val) && regPost2.test(val)) {
return true
} else {
return false
}
}
}
}