盘点差异管理的审核状态筛选与审核按钮功能
This commit is contained in:
@@ -81,65 +81,40 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="物料guid" prop="productGuid">
|
||||
<el-form-item :label="$t('checkDifference.status')" prop="status"> <!-- 审核状态 -->
|
||||
<el-select v-model="queryParams.status" :placeholder="$t('checkDifference.inputStatus')" clearable>
|
||||
<el-option :label="$t('checkDifference.unaudited')" value="0" /> <!-- 未审核 -->
|
||||
<el-option :label="$t('checkDifference.audited')" value="1" /> <!-- 已审核 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('checkDifference.productGuid')" prop="productGuid"> 物料guid
|
||||
<el-input
|
||||
v-model="queryParams.productGuid"
|
||||
placeholder="请输入物料guid"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('checkDifference.search')}}</el-button> <!-- 搜索 -->
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('checkDifference.reset')}}</el-button> <!-- 重置 -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-row :gutter="10" class="mb8">-->
|
||||
<!--<!– <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['check:difference:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['check:difference:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['check:difference:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>–>-->
|
||||
<!--<!– <el-col :span="1.5">–>-->
|
||||
<!--<!– <el-button–>-->
|
||||
<!--<!– type="warning"–>-->
|
||||
<!--<!– plain–>-->
|
||||
<!--<!– icon="el-icon-download"–>-->
|
||||
<!--<!– size="mini"–>-->
|
||||
<!--<!– @click="handleExport"–>-->
|
||||
<!--<!– v-hasPermi="['check:difference:export']"–>-->
|
||||
<!--<!– >导出</el-button>–>-->
|
||||
<!--<!– </el-col>–>-->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="multiple || queryParams.status === '1'"
|
||||
@click="handleAudit"
|
||||
v-hasPermi="['check:difference:audit']"
|
||||
>{{$t('checkDifference.audit')}}</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="differenceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
@@ -156,6 +131,11 @@
|
||||
<el-table-column :label="$t('checkDifference.newQuantity')" align="center" prop="newQuantity" /> <!-- 新值 -->
|
||||
<el-table-column :label="$t('checkDifference.recordType')" align="center" prop="recordType" /> <!-- 操作方式 -->
|
||||
<el-table-column :label="$t('checkDifference.createTime')" align="center" prop="createTime" /> <!-- 创建时间 -->
|
||||
<el-table-column :label="$t('checkDifference.status')" align="center" prop="status"> <!-- 审核状态 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="[{ label: $t('checkDifference.unaudited'), value: '0', raw: { listClass: 'info' } }, { label: $t('checkDifference.audited'), value: '1', raw: { listClass: 'success' } }]" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('checkDifference.productGuid')" align="center" prop="productGuid" /> <!– 物料guid –>-->
|
||||
<!-- <el-table-column :label="$t('checkDifference.operation')" align="center" class-name="small-padding fixed-width"> <!– 操作 –>
|
||||
<template slot-scope="scope">
|
||||
@@ -231,10 +211,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDifference, getDifference, delDifference, addDifference, updateDifference } from "@/api/check/difference"
|
||||
import { listDifference, getDifference, delDifference, addDifference, updateDifference, auditDifference } from "@/api/check/difference"
|
||||
import { listDifferenceRecordFinish } from "@/api/check/DifferenceRecordFinish"
|
||||
import DictTag from "@/components/DictTag"
|
||||
|
||||
export default {
|
||||
name: "Difference",
|
||||
components: {
|
||||
DictTag
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -270,7 +255,8 @@ export default {
|
||||
oldQuantity: null,
|
||||
newQuantity: null,
|
||||
recordType: null,
|
||||
productGuid: null
|
||||
productGuid: null,
|
||||
status: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -286,11 +272,21 @@ export default {
|
||||
/** 查询盘点差异列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listDifference(this.queryParams).then(response => {
|
||||
this.differenceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
if (this.queryParams.status === '1') {
|
||||
// 已审核,查询历史表
|
||||
listDifferenceRecordFinish(this.queryParams).then(response => {
|
||||
this.differenceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
// 未审核或未选择状态,查询差异表
|
||||
listDifference(this.queryParams).then(response => {
|
||||
this.differenceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@@ -313,7 +309,8 @@ export default {
|
||||
newQuantity: null,
|
||||
recordType: null,
|
||||
createTime: null,
|
||||
productGuid: null
|
||||
productGuid: null,
|
||||
status: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
@@ -384,7 +381,17 @@ export default {
|
||||
this.download('check/difference/export', {
|
||||
...this.queryParams
|
||||
}, `difference_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
},
|
||||
/** 审核按钮操作 */
|
||||
handleAudit() {
|
||||
const checkGuids = this.ids
|
||||
this.$modal.confirm('是否确认审核选中的' + checkGuids.length + '条数据?').then(function() {
|
||||
return auditDifference(checkGuids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("审核成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user