|
|
@@ -170,6 +170,10 @@
|
|
|
<span> {{ getDictValue('请托类型', row.type + '') }}</span>
|
|
|
</template>
|
|
|
|
|
|
+ <template v-slot:totalCount="{ row }">
|
|
|
+ <span> {{ row.totalCount }}{{ row.measuringUnit }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:status="{ row }">
|
|
|
<el-tag>{{
|
|
|
row.status == 0 ? '未提交' : row.status == 1 ? '已提交' : '已发布'
|
|
|
@@ -177,10 +181,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:sendStatus="{ row }">
|
|
|
- <el-tag v-if="row.sendStatus == 0">{{ '未发货' }}</el-tag>
|
|
|
- <el-tag v-else-if="row.sendStatus == 1">{{ '已发货' }}</el-tag>
|
|
|
- <el-tag v-else-if="row.sendStatus == 2">{{ '已收货' }}</el-tag>
|
|
|
- <span v-else>无</span>
|
|
|
+ <el-tag v-if="row.sendStatus == 0 || !row.sendStatus">{{
|
|
|
+ '未发货'
|
|
|
+ }}</el-tag>
|
|
|
+ <el-tag v-else-if="row.sendStatus == 1" type="success">{{
|
|
|
+ '已发货'
|
|
|
+ }}</el-tag>
|
|
|
+ <el-tag v-else-if="row.sendStatus == 2" type="success">{{
|
|
|
+ '已收货'
|
|
|
+ }}</el-tag>
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:approvalStatus="{ row }">
|
|
|
@@ -240,7 +249,7 @@
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
- @click="sendGoods(row)"
|
|
|
+ @click="sendGoods(row, 'add')"
|
|
|
v-if="
|
|
|
row.approvalStatus == 2 && (row.sendStatus == 0 || !row.sendStatus)
|
|
|
"
|
|
|
@@ -248,6 +257,18 @@
|
|
|
发货
|
|
|
</el-link>
|
|
|
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="sendGoods(row, 'detail')"
|
|
|
+ v-if="
|
|
|
+ row.approvalStatus == 2 &&
|
|
|
+ (row.sendStatus == 1 || row.sendStatus == 2)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 发货详情
|
|
|
+ </el-link>
|
|
|
+
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@@ -265,6 +286,9 @@
|
|
|
<detail ref="detailsRef"></detail>
|
|
|
|
|
|
<timeDialog ref="timeDialogRef"></timeDialog>
|
|
|
+ <goodsDetail ref="goodsDetailRef" @done="reloads"></goodsDetail>
|
|
|
+
|
|
|
+ <Create ref="create" @refresh="reloads" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -279,13 +303,18 @@
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import { getList as getPleaseListData } from '@/api/entrust/index';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
+ import Create from '@/views/entrust/components/create.vue';
|
|
|
+ import goodsDetail from '@/views/entrust/components/goodsDetail.vue';
|
|
|
+ import { remove, submit, warehouseEntry } from '@/api/entrust/index.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
search,
|
|
|
flow,
|
|
|
release,
|
|
|
Detail,
|
|
|
- timeDialog
|
|
|
+ timeDialog,
|
|
|
+ Create,
|
|
|
+ goodsDetail
|
|
|
},
|
|
|
|
|
|
props: {
|
|
|
@@ -568,6 +597,7 @@
|
|
|
},
|
|
|
{
|
|
|
prop: 'totalCount',
|
|
|
+ slot: 'totalCount',
|
|
|
label: '请托数量',
|
|
|
align: 'center',
|
|
|
width: 130,
|
|
|
@@ -778,12 +808,46 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ remove(id) {
|
|
|
+ let ids = id || this.selection.map((item) => item.id);
|
|
|
+ remove(ids).then((res) => {
|
|
|
+ this.$message.success('删除' + res);
|
|
|
+ this.reloads();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ submit(item) {
|
|
|
+ this.$confirm('是否提交该请托单的审核流程?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ submit({
|
|
|
+ businessId: item.id,
|
|
|
+ beEntrustedDeptId: item.beEntrustedDeptId
|
|
|
+ }).then((res) => {
|
|
|
+ this.$message.success('提交' + res.message);
|
|
|
+ this.reloads();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
getPleaseType(item) {
|
|
|
const data = this.pleaseTypeList.filter((it) => it.value == item.type);
|
|
|
|
|
|
return data.length != 0 ? data[0].label : '';
|
|
|
},
|
|
|
|
|
|
+ sendGoods(item, type) {
|
|
|
+ this.$refs.goodsDetailRef.open(item, type);
|
|
|
+ },
|
|
|
+
|
|
|
+ open(type, row) {
|
|
|
+ this.$refs.create.open(type, row);
|
|
|
+ },
|
|
|
+
|
|
|
async getDataList(code) {
|
|
|
this.workOrderCode = code;
|
|
|
await getList({
|
|
|
@@ -798,7 +862,6 @@
|
|
|
},
|
|
|
|
|
|
async getPleaseData(code) {
|
|
|
- console.log(code, '22000');
|
|
|
this.workOrderCode = code;
|
|
|
await getPleaseListData({
|
|
|
pageNum: 1,
|
|
|
@@ -828,6 +891,12 @@
|
|
|
this.$refs.timeDialogRef.open(row, 'details');
|
|
|
},
|
|
|
|
|
|
+ reloads() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getPleaseData(this.workOrderCode);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
handleRelease(row) {
|
|
|
this.$refs.releaseRef.open(row);
|
|
|
},
|