feat(front):前端审核代码提交;

master
jiyufei 4 months ago
parent 71267a0a40
commit 1c72632dda

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.RecycleCleanOrderMapper">
<mapper namespace="jnpf.mapper.RecycleDeliveryOrderMapper">
<update id="auditBatch">
UPDATE NX_RECYCLE_DELIVERY_ORDER

@ -15,5 +15,5 @@ import org.apache.ibatis.annotations.Param;
*/
public interface RecycleDeliveryOrderMapper extends BaseMapper<RecycleDeliveryOrderEntity> {
int auditBatch(@Param("bacth") DeliveryAuditBatch batch);
int auditBatch(@Param("batch") DeliveryAuditBatch batch);
}

@ -607,6 +607,7 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
// 添加商户流水
EnterpriseAccountBillEntity billEntity = new EnterpriseAccountBillEntity();
billEntity.setEnterpriseId(companyId);
billEntity.setCompanyId(companyId);
billEntity.setBillNumber(getIdNumber("BL"));
billEntity.setAccountBalance(fund);

@ -215,8 +215,8 @@ public class RecycleCleanOrderController {
@PostMapping("/auditBatch")
public ActionResult AuditBatch(@RequestBody CleanAuditBatch batch) {
int up = recycleCleanOrderService.auditBatch(batch);
if (up > 0) return ActionResult.success("审核操作成功");
else return ActionResult.fail("审核操作失败");
if (up > 0) return ActionResult.success("审核成功");
else return ActionResult.fail("审核失败");
}
}

@ -0,0 +1,51 @@
<template>
<el-dialog title="批量审核" :visible.sync="showDialog" width="30%" @close="handleDialogClose">
<el-form ref="form" :model="form" label-width="120px">
<el-form-item label="*审核意见">
<el-input v-model="form.adjustComm" placeholder="请输入审核意见"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="showDialog = false"> </el-button>
<el-button type="primary" @click="handleSubmit"> </el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
selectedRows: {
type: Array,
default: () => []
},
onSubmit: {
type: Function,
default: () => { },
},
},
data() {
return {
form: {
adjustComm: '',
},
};
},
methods: {
handleDialogClose() {
this.form.adjustComm = ''; //
this.$emit('update:showDialog', false); // showDialog
},
handleSubmit() {
this.onSubmit({
adjustComm: this.form.adjustComm,
});
this.handleDialogClose(); //
},
},
};
</script>

@ -27,6 +27,9 @@
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="success" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="showDialog = true">批量审核
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
@ -40,8 +43,9 @@
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod">
<el-table-column prop="orderNo" label="清运单号" align="left">
:span-method="arraySpanMethod" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column prop="orderNo" label="清运单号" align="left" width="150">
</el-table-column>
<el-table-column prop="deviceCode" label="设备编码" align="left">
</el-table-column>
@ -53,7 +57,7 @@
</el-table-column>
<el-table-column prop="productSubCode" label="回收品子类" align="left">
</el-table-column>
<el-table-column prop="deviceOrderNo" label="机柜清运单号" align="left">
<el-table-column prop="deviceOrderNo" label="机柜清运单号" align="left" width="100">
</el-table-column>
<el-table-column prop="price" label="单价" align="left">
<template slot-scope="scope" v-if="scope.row.price">
@ -82,7 +86,7 @@
</el-table-column>
<el-table-column prop="cleanUserId" label="清运员" align="left">
</el-table-column>
<el-table-column prop="phone" label="清运员手机号" align="left">
<el-table-column prop="phone" label="清运员手机号" align="left" width="100">
</el-table-column>
<el-table-column label="入库状态" prop="entryStatus" algin="left">
<template slot-scope="scope">
@ -109,8 +113,8 @@
</el-button>
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
<el-button type="text" v-show="scope.row.adjustStatus === ''" @click="auditHandle(scope.row)"
v-has="'btn_edit'">审核
<el-button type="text" v-show="scope.row.adjustStatus === ''"
@click="auditHandle(scope.row)" v-has="'btn_edit'">审核
</el-button>
</template>
</el-table-column>
@ -122,15 +126,13 @@
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<Audit v-if="auditHandleVisible" ref="Audit" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
<DialogComponent :showDialog.sync="showDialog" @update:showDialog="showDialog = $event"
:onSubmit="handleSubmit" />
</div>
</template>
@ -152,17 +154,21 @@ import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
import DialogComponent from './DialogComponent.vue';
export default {
components: {
JNPFForm,
Detail,
Audit,
DialogComponent,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
selectedRows: [],
selectedIds:[],
showDialog: false,
keyword: '',
expandsTree: true,
refreshTree: true,
@ -172,7 +178,6 @@ export default {
mergeList: [],
exportList: [],
columnList,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
@ -226,10 +231,14 @@ export default {
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
handleSelectionChange(val) {
this.selectedRows = val;
this.selectedIds = this.selectedRows.map(row => row.id);
},
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
@ -509,6 +518,34 @@ export default {
this.flowVisible = false
if (isrRefresh) this.reset()
},
handleSubmit(rows) {
if (this.selectedIds.length == 0) {
this.$message.error('请选择要审核的单据!');
return;
}
if (rows.adjustComm == null || rows.adjustComm == '') {
this.$message.error('请填写您的审核意见!');
return;
}
let _query = {
adjustStatus: 1,
ids:this.selectedIds,
adjustComm:rows.adjustComm,
entryStatus:1
};
request({
url: `/api/scm/RecycleCleanOrder/auditBatch`,
method: 'post',
data: _query
}).then(res => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
})
this.initData()
})
},
}
}
</script>

Loading…
Cancel
Save