退料联调代码提交

This commit is contained in:
zzyuan 2024-11-14 18:06:10 +08:00
parent 3511ca822c
commit 3e54607772
4 changed files with 489 additions and 348 deletions

View File

@ -78,6 +78,15 @@ export function editBackApply(data) {
}) })
} }
// 退料提交
export function submitBackApply(data) {
return request({
url: '/material/back_apply_info/submitBackApply',
method: 'post',
data: data,
})
}
//新增编辑-编码类型-获取所有编码 //新增编辑-编码类型-获取所有编码
export function getMachineById(query) { export function getMachineById(query) {

View File

@ -346,9 +346,6 @@
</template> </template>
<script> <script>
import {
equipmentTypeTree,
} from '@/api/purchase/goodsArrived';
import { import {
getProjectList, getProjectList,
getUnitList, getUnitList,
@ -359,19 +356,6 @@ import {
editBackApply, editBackApply,
getMachineById getMachineById
} from '@/api/back/index.js' } from '@/api/back/index.js'
// import {
// getProData,
// getUnitData,
// getDeviceTypeTree,
// getAgreementInfoById,
// submitLeaseApply,
// getUseTypeTreee,
// getUseNumByTypeId,
// } from '@/api/claimAndRefund/receive'
// import {
// materialReturnNoteByApply,
// } from '@/api/claimAndRefund/return.js'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { getInfo, h } from '@/api/login' import { getInfo, h } from '@/api/login'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
@ -387,14 +371,6 @@ export default {
} }
}, },
data() { data() {
const validatePhone = (rule, value, callback) => {
const reg = /^[1][3-9][0-9]{9}$/
if (!reg.test(value)) {
this.queryParams.phone = ''
} else {
callback()
}
}
return { return {
// //
loading: false, loading: false,
@ -504,10 +480,6 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
// phone: [
// { validator: validatePhone, trigger: "blur"},
// {required: true, message: '', trigger: 'change'},
// ],
}, },
unitList: [], // unitList: [], //
proList: [], // proList: [], //

View File

@ -112,7 +112,6 @@
type="warning" type="warning"
plain plain
size="mini" size="mini"
@click="handleSubmit"
>提交</el-button >提交</el-button
> >
</el-col> </el-col>
@ -257,17 +256,28 @@
> >
<el-button <el-button
size="mini" size="mini"
type="warning" type="primary"
plain plain
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.taskStatus!=2"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-button
size="mini"
type="success"
plain
icon="el-icon-edit"
v-if="scope.row.taskStatus!=2"
@click="handleSubmit(scope.row)"
>提交</el-button
>
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
v-if="scope.row.taskStatus!=2&&scope.row.taskStatus!=1"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> >
@ -351,8 +361,8 @@ import {
getBackApplyList, getBackApplyList,
getProjectList, getProjectList,
getUnitList, getUnitList,
backApplyRemove backApplyRemove,
submitBackApply
} from '@/api/back/index.js' } from '@/api/back/index.js'
// import { getInfo, h } from '@/api/login' // import { getInfo, h } from '@/api/login'
// import { // import {
@ -540,16 +550,30 @@ export default {
this.title = '查看' this.title = '查看'
this.isShowOneFlag = true this.isShowOneFlag = true
}, },
// // //
handleSubmit() { // handleSubmit() {
this.title = '确认操作' // this.title = ''
this.openTextOne = '确认提交退料么?' // this.openTextOne = '退?'
this.openTextTwo = '确认提交退料么?' // this.openTextTwo = '退?'
this.openOne = true // this.openOne = true
}, // },
submitOpenOneForm() { // submitOpenOneForm() {
this.openTextThree = '提交成功!' // this.openTextThree = ''
this.openTwo = true // this.openTwo = true
// },
handleSubmit(row){
this.$modal.confirm('是否确认提交所选择的退料任务?') .then(() => {
let param = {
id:row.id,
taskId:row.taskId
}
submitBackApply(param).then((res) => {
this.getList()
this.$message.success('操作成功!')
})
}).catch(() => {
})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
@ -557,7 +581,7 @@ export default {
// id:row.id+ '', // id:row.id+ '',
// } // }
this.$modal this.$modal
.confirm('是否确认删除所选择的数据项') .confirm('是否确认删除所选择的退料任务')
.then(() => { .then(() => {
return backApplyRemove(row.id) return backApplyRemove(row.id)
}) })
@ -575,9 +599,11 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
'material/backApply/export', 'material/back_apply_info/export',
{ {
...this.queryParams, ...this.queryParams,
startTime:this.queryParams.time[0],
endTime:this.queryParams.time[1]
}, },
`退料申请单_${new Date().getTime()}.xlsx`, `退料申请单_${new Date().getTime()}.xlsx`,
) )

File diff suppressed because it is too large Load Diff