优化接口以及样式等问题
This commit is contained in:
parent
1ec88a938f
commit
1b85e9d1b9
|
|
@ -183,9 +183,9 @@ export default {
|
|||
/* form 查询组件触发的自定义事件 */
|
||||
async queryList(val, reset) {
|
||||
if (reset) {
|
||||
this.pageParams.pageNum = 1
|
||||
this.pageParams.pageSize = 10
|
||||
}
|
||||
this.pageParams.pageNum = 1
|
||||
this.pageParams = Object.assign(
|
||||
val,
|
||||
this.pageParams,
|
||||
|
|
|
|||
|
|
@ -1008,7 +1008,7 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
//输入出库数量
|
||||
// 输入出库数量
|
||||
checkNum(row) {
|
||||
let maxNum = row.outNum
|
||||
if (row.inputNum <= 1) {
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@
|
|||
@click="handleSubmitScrap(data)"
|
||||
>提交报废</el-button
|
||||
>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
v-if="data.taskStatus == 61"
|
||||
@click="handleReject(data)"
|
||||
style="color: #e6a23c"
|
||||
icon="el-icon-document-delete"
|
||||
>驳回退料</el-button
|
||||
>
|
||||
> -->
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleAuditing(data)"
|
||||
|
|
|
|||
|
|
@ -37,22 +37,22 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskState"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskState"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskState"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskState"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskState"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskState"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
|
|
@ -150,12 +150,14 @@
|
|||
|
||||
<el-table-column label="采购状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.taskStatus == '122'">待审核</span>
|
||||
<span v-if="scope.row.taskStatus == '122'">待审核</span>
|
||||
<span v-if="scope.row.taskStatus == '105'">入库审核中</span>
|
||||
<span v-if="scope.row.taskStatus == '106'">已驳回</span>
|
||||
<span v-if="scope.row.taskStatus == '28'">已全部入库</span>
|
||||
<span v-if="scope.row.taskStatus == '107'">入库审核未通过</span>
|
||||
<span v-if="scope.row.taskStatus == '123'">部分已入库</span>
|
||||
<span v-if="scope.row.taskStatus == '107'"
|
||||
>入库审核未通过</span
|
||||
>
|
||||
<span v-if="scope.row.taskStatus == '123'">部分已入库</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -247,36 +249,34 @@
|
|||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8" v-if="showBatchButtons">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="passAll"
|
||||
>通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
>不通过</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8" v-if="showBatchButtons">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain size="mini" @click="passAll"
|
||||
>通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
>不通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailTableList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="400"
|
||||
>
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55"-->
|
||||
<!-- align="center"-->
|
||||
<!-- :selectable="selectable"-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55"-->
|
||||
<!-- align="center"-->
|
||||
<!-- :selectable="selectable"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
|
|
@ -332,30 +332,30 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- align="center"-->
|
||||
<!-- class-name="small-padding fixed-width"-->
|
||||
<!-- v-if="showHandle"-->
|
||||
<!-- width="150"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="pass(scope.row)"-->
|
||||
<!-- >通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="refused(scope.row)"-->
|
||||
<!-- >不通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- align="center"-->
|
||||
<!-- class-name="small-padding fixed-width"-->
|
||||
<!-- v-if="showHandle"-->
|
||||
<!-- width="150"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="pass(scope.row)"-->
|
||||
<!-- >通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- v-if="scope.row.status == '0'"-->
|
||||
<!-- @click="refused(scope.row)"-->
|
||||
<!-- >不通过</el-button-->
|
||||
<!-- >-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -551,16 +551,16 @@ export default {
|
|||
//搜索下拉数据
|
||||
typeList: [],
|
||||
modelList: [],
|
||||
// 采购状态下拉数据
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskState: null },
|
||||
{ label: '待审核', taskState: 122 },
|
||||
{ label: '入库审核中', taskState: 105 },
|
||||
{ label: '已驳回', taskState: 106 },
|
||||
{ label: '入库审核未通过', taskState: 107 },
|
||||
{ label: '部分已入库', taskState: 123 },
|
||||
{ label: '已全部入库', taskState: 28 }
|
||||
],
|
||||
{ label: '全部', taskState: null },
|
||||
{ label: '待审核', taskState: 122 },
|
||||
{ label: '入库审核中', taskState: 105 },
|
||||
{ label: '已驳回', taskState: 106 },
|
||||
{ label: '入库审核未通过', taskState: 107 },
|
||||
{ label: '部分已入库', taskState: 123 },
|
||||
{ label: '已全部入库', taskState: 28 },
|
||||
],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
|
|
@ -572,7 +572,7 @@ export default {
|
|||
printData: {},
|
||||
printTableData: [],
|
||||
showHandle: true,
|
||||
showBatchButtons: true,
|
||||
showBatchButtons: true,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
|
|
@ -609,13 +609,19 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 监听数据的变化,当 taskStatus 符合条件时显示批量按钮
|
||||
this.$watch('detailTableList', () => {
|
||||
this.showBatchButtons = this.detailTableList.some(item => item.taskStatus === '122');
|
||||
}, { deep: true });
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
// 监听数据的变化,当 taskStatus 符合条件时显示批量按钮
|
||||
this.$watch(
|
||||
'detailTableList',
|
||||
() => {
|
||||
this.showBatchButtons = this.detailTableList.some(
|
||||
(item) => item.taskStatus === '122',
|
||||
)
|
||||
},
|
||||
{ deep: true },
|
||||
)
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
},
|
||||
|
|
@ -640,10 +646,11 @@ export default {
|
|||
taskStatus: this.queryParams.taskState,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
flag: 0,
|
||||
}
|
||||
getPutInList(this.addDateRange(params)).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
getPutInList(this.addDateRange(params)).then((res) => {
|
||||
this.tableList = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
|
@ -701,9 +708,9 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange() {
|
||||
console.log(this.ids)
|
||||
this.ids = this.detailTableList.map((item) => item) // 假设数据的唯一标识为 id
|
||||
console.log(this.ids)
|
||||
console.log(this.ids)
|
||||
this.ids = this.detailTableList.map((item) => item) // 假设数据的唯一标识为 id
|
||||
console.log(this.ids)
|
||||
// this.single = selection.length != 1
|
||||
// this.multiple = !selection.length
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,40 +8,39 @@
|
|||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskStatus"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskStatus"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskStatus"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskStatus"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
|
|
@ -172,12 +171,12 @@
|
|||
v-if="scope.row.taskStatus == '107'"
|
||||
>入库审核未通过</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '123'"
|
||||
>部分已入库</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '123'"
|
||||
>部分已入库</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -195,9 +194,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.taskStatus == '105'
|
||||
"
|
||||
v-if="scope.row.taskStatus == '105'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['warehousing:auditing']"
|
||||
>审核</el-button
|
||||
|
|
@ -206,7 +203,10 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.taskStatus == '28' || scope.row.taskStatus == '123'"
|
||||
v-if="
|
||||
scope.row.taskStatus == '28' ||
|
||||
scope.row.taskStatus == '123'
|
||||
"
|
||||
@click="handlePrint(scope.row)"
|
||||
>入库单</el-button
|
||||
>
|
||||
|
|
@ -358,7 +358,7 @@
|
|||
<span v-if="scope.row.status == '0'">待审核</span>
|
||||
<span v-if="scope.row.status == '1'">已入库</span>
|
||||
<span v-if="scope.row.status == '2'">已驳回</span>
|
||||
<span v-if="scope.row.status == '3'">待审核</span>
|
||||
<span v-if="scope.row.status == '3'">待审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -380,14 +380,20 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0' || scope.row.status == '3'"
|
||||
v-if="
|
||||
scope.row.status == '0' ||
|
||||
scope.row.status == '3'
|
||||
"
|
||||
@click="pass(scope.row)"
|
||||
>通过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0' || scope.row.status == '3'"
|
||||
v-if="
|
||||
scope.row.status == '0' ||
|
||||
scope.row.status == '3'
|
||||
"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button
|
||||
>
|
||||
|
|
@ -575,14 +581,14 @@ export default {
|
|||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskStatus: null },
|
||||
{ label: '入库审核中', taskStatus: 105 },
|
||||
{ label: '入库审核未通过', taskStatus: 107 },
|
||||
{ label: '部分已入库', taskStatus: 123 },
|
||||
{ label: '已全部入库', taskStatus: 28 }
|
||||
],
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskStatus: null },
|
||||
{ label: '入库审核中', taskStatus: 105 },
|
||||
{ label: '入库审核未通过', taskStatus: 107 },
|
||||
{ label: '部分已入库', taskStatus: 123 },
|
||||
{ label: '已全部入库', taskStatus: 28 },
|
||||
],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
|
|
@ -606,6 +612,7 @@ export default {
|
|||
taskStatus: null,
|
||||
keyWord: '',
|
||||
typeId: '',
|
||||
flag: 0,
|
||||
},
|
||||
query: {
|
||||
pageNum: 1,
|
||||
|
|
@ -647,8 +654,8 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
getPutInList(this.queryParams).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.tableList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ export default {
|
|||
const queryParams = {
|
||||
id: this.editInfo.id,
|
||||
wholeTypeName: this.editInfo.wholeTypeName,
|
||||
pageNum: 1,
|
||||
pageSize: 99999,
|
||||
}
|
||||
const { data: res } = await queryCompleteSetToolsApi(queryParams)
|
||||
this.tempList = res.rows
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ export default {
|
|||
const queryParams = {
|
||||
id: this.editInfo.id,
|
||||
wholeTypeName: this.editInfo.wholeTypeName,
|
||||
pageNum: 1,
|
||||
pageSize: 99999,
|
||||
}
|
||||
const { data: res } = await queryCompleteSetToolsApi(queryParams)
|
||||
this.tempList = res.rows
|
||||
|
|
|
|||
|
|
@ -653,10 +653,11 @@ export default {
|
|||
taskStatus: this.queryParams.taskState,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
flag: 0,
|
||||
}
|
||||
getPutInList(this.addDateRange(params)).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.tableList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ export default {
|
|||
status: undefined,
|
||||
keyWord: '',
|
||||
typeId: '',
|
||||
flag: 0,
|
||||
},
|
||||
query: {
|
||||
pageNum: 1,
|
||||
|
|
@ -657,8 +658,8 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
getPutInList(this.queryParams).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.tableList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue