|
@@ -13,6 +13,7 @@ export default {
|
|
|
ShiftModel: () => import("./modify-buyer/index.vue"),
|
|
|
DirectModel: () => import("./first-direct/index.vue"),
|
|
|
ReturnModel: () => import("./documents-return/index.vue"),
|
|
|
+ ElDictTag: () => import("@/components/DictTag/index.vue"),
|
|
|
ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
|
|
|
ElPopoverMultipleSelectV2: () =>
|
|
|
import("@/components/popover-select-v2/multiple.vue"),
|
|
@@ -71,16 +72,22 @@ export default {
|
|
|
// 查 询
|
|
|
async useQuery(prop, page) {
|
|
|
const { pageNum, pageSize } = page;
|
|
|
- const { date, documentsCodes: code } = prop;
|
|
|
+ const { date, documentsCodes: dCode, materialCodes: mCode } = prop;
|
|
|
const [startDate, endDate] = date || [];
|
|
|
- const documentsCodes = code
|
|
|
- ? code.replace(/\s*/g, "").replaceAll(",", ",")
|
|
|
+ const documentsCodes = dCode
|
|
|
+ ? dCode.replace(/\s*/g, "").replaceAll(",", ",")
|
|
|
+ : undefined;
|
|
|
+ const materialCodes = Array.isArray(mCode)
|
|
|
+ ? mCode
|
|
|
+ : mCode
|
|
|
+ ? mCode.replace(/\s*/g, "").replaceAll(",", ",").split(",")
|
|
|
: undefined;
|
|
|
await this.fetchList(
|
|
|
{
|
|
|
...prop,
|
|
|
endDate,
|
|
|
startDate,
|
|
|
+ materialCodes,
|
|
|
documentsCodes,
|
|
|
date: undefined,
|
|
|
},
|
|
@@ -179,8 +186,8 @@ export default {
|
|
|
>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col
|
|
|
- v-for="column in searchColumns"
|
|
|
- :key="column.item.title"
|
|
|
+ v-for="(column, index) in searchColumns"
|
|
|
+ :key="index"
|
|
|
:span="column.item.span || 6"
|
|
|
>
|
|
|
<el-form-item :prop="column.item.key" :label="column.item.title">
|
|
@@ -211,9 +218,6 @@ export default {
|
|
|
查 询
|
|
|
</el-button>
|
|
|
<el-button :size="size" @click="useReset"> 重 置 </el-button>
|
|
|
- <!-- <el-button :size="size" @click="useExport(params, page)">
|
|
|
- 导 出
|
|
|
- </el-button> -->
|
|
|
<el-button
|
|
|
v-show="hasPowerShift(selectData)"
|
|
|
:size="size"
|
|
@@ -228,13 +232,6 @@ export default {
|
|
|
>
|
|
|
退回需求
|
|
|
</el-button>
|
|
|
- <!-- <el-button
|
|
|
- :size="size"
|
|
|
- :disabled="selectData.length !== 1"
|
|
|
- @click="useClose(selectData[0])"
|
|
|
- >
|
|
|
- 行关闭
|
|
|
- </el-button> -->
|
|
|
<el-button
|
|
|
v-show="hasPowerDirect(selectData)"
|
|
|
:size="size"
|
|
@@ -259,24 +256,27 @@ export default {
|
|
|
:selectable="setSelectable"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column width="55" align="center" type="index">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.$index }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- v-for="(column, index) in tableColumns"
|
|
|
+ v-for="({ item, attr }, index) in tableColumns"
|
|
|
:key="index"
|
|
|
- :prop="column.item.key"
|
|
|
- :label="column.item.title"
|
|
|
- :width="column.item.width || 200"
|
|
|
+ :prop="item.key"
|
|
|
+ :label="item.title"
|
|
|
+ :width="item.width || 250"
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag
|
|
|
- v-if="column.attr.dictName"
|
|
|
+ v-if="attr.dictName"
|
|
|
:size="size"
|
|
|
- :value="scope.row[column.item.key]"
|
|
|
- :options="$dicts[column.attr.dictName]"
|
|
|
+ :value="scope.row[item.key]"
|
|
|
+ :options="$dicts[attr.dictName]"
|
|
|
/>
|
|
|
- <component is="span" v-else>{{
|
|
|
- scope.row[column.item.key]
|
|
|
- }}</component>
|
|
|
+ <component is="span" v-else>{{ scope.row[item.key] }}</component>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -288,7 +288,6 @@ export default {
|
|
|
/>
|
|
|
</el-card>
|
|
|
</template>
|
|
|
-
|
|
|
<style scoped lang="scss">
|
|
|
.el-card {
|
|
|
width: calc(100% - 20px);
|
|
@@ -309,6 +308,10 @@ export default {
|
|
|
.el-table__cell {
|
|
|
height: 50px;
|
|
|
}
|
|
|
+ td.el-table__cell {
|
|
|
+ border-right: 0;
|
|
|
+ // border-bottom: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|