|
@@ -23,7 +23,8 @@
|
|
|
action: () => start(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList">
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
<template #claimTime="{ item }">
|
|
|
<div>
|
|
|
<span v-if="item.claimTime">{{ item.claimTime }}</span>
|
|
@@ -51,8 +52,12 @@
|
|
|
</template>
|
|
|
<template #btn="{ item }">
|
|
|
<div v-if="item.expendQuantity > 0">
|
|
|
- <el-button type="primary" link @click="start(10, item)">采购</el-button>
|
|
|
- <el-button type="primary" link @click="transferToProduction(item)">转生产</el-button>
|
|
|
+ <el-button type="primary" link @click="start(10, item)"
|
|
|
+ >采购</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" link @click="transferToProduction(item)"
|
|
|
+ >转生产</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div v-else-if="item.expendQuantity == 0">
|
|
|
<el-button type="primary" link @click="handleFollow(item)"
|
|
@@ -63,26 +68,83 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- <el-button type="primary" link style="color: #f54a45" @click="handleFollow(item)">跟进</el-button>
|
|
|
- <el-button type="primary" link style="color: #f54a45" @click="lookRecords(item)">跟进记录</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ style="color: #f54a45"
|
|
|
+ @click="handleFollow(item)"
|
|
|
+ >跟进</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ style="color: #f54a45"
|
|
|
+ @click="lookRecords(item)"
|
|
|
+ >跟进记录</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
|
|
|
- <el-dialog title="转生产" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
|
|
|
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
+ <el-dialog
|
|
|
+ title="转生产"
|
|
|
+ v-if="dialogVisible"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ width="1200"
|
|
|
+ v-loading="loadingDialog"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.data"
|
|
|
+ :rules="rules"
|
|
|
+ ref="submit"
|
|
|
+ >
|
|
|
<template #details>
|
|
|
<div style="width: 100%">
|
|
|
- <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
|
|
|
- <el-table-column prop="productCode" label="物品编码" width="140" />
|
|
|
- <el-table-column prop="productName" label="物品名称" min-width="220" />
|
|
|
- <el-table-column prop="productUnit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.productUnit, productUnit)" />
|
|
|
- <el-table-column prop="expendQuantity" label="待处理数量" width="120" />
|
|
|
+ <el-table
|
|
|
+ :data="formData.data.list"
|
|
|
+ style="width: 100%; margin-top: 16px"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="productCode"
|
|
|
+ label="物品编码"
|
|
|
+ width="140"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="productName"
|
|
|
+ label="物品名称"
|
|
|
+ min-width="220"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="productUnit"
|
|
|
+ label="单位"
|
|
|
+ width="100"
|
|
|
+ :formatter="
|
|
|
+ (row) => dictValueLabel(row.productUnit, productUnit)
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="expendQuantity"
|
|
|
+ label="待处理数量"
|
|
|
+ width="120"
|
|
|
+ />
|
|
|
<el-table-column label="转生产数量" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
- <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
|
|
|
+ <el-form-item
|
|
|
+ :prop="'list.' + $index + '.quantity'"
|
|
|
+ :rules="rules.quantity"
|
|
|
+ :inline-message="true"
|
|
|
+ >
|
|
|
+ <el-input-number
|
|
|
+ v-model="row.quantity"
|
|
|
+ placeholder="请输入数量"
|
|
|
+ style="width: 100%"
|
|
|
+ :precision="0"
|
|
|
+ :controls="false"
|
|
|
+ :min="0"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -90,15 +152,31 @@
|
|
|
<el-table-column label="完工期限" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'list.' + $index + '.time'" :rules="rules.time" :inline-message="true">
|
|
|
- <el-date-picker v-model="row.time" type="date" placeholder="请选择" value-format="YYYY-MM-DD" />
|
|
|
+ <el-form-item
|
|
|
+ :prop="'list.' + $index + '.time'"
|
|
|
+ :rules="rules.time"
|
|
|
+ :inline-message="true"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="row.time"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="操作" width="80" fixed="right">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="操作"
|
|
|
+ width="80"
|
|
|
+ fixed="right"
|
|
|
+ >
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
|
|
|
+ <el-button type="primary" link @click="handleDelete($index)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -107,21 +185,45 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="填写跟进" v-if="dialogVisibleOne" v-model="dialogVisibleOne" width="500" v-loading="loadingDialog">
|
|
|
- <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="submitOne"> </byForm>
|
|
|
+ <el-dialog
|
|
|
+ title="填写跟进"
|
|
|
+ v-if="dialogVisibleOne"
|
|
|
+ v-model="dialogVisibleOne"
|
|
|
+ width="500"
|
|
|
+ v-loading="loadingDialog"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfigOne"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.dataOne"
|
|
|
+ :rules="rulesOne"
|
|
|
+ ref="submitOne"
|
|
|
+ >
|
|
|
+ </byForm>
|
|
|
<template #footer>
|
|
|
- <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitFormOne()" size="large">确 定</el-button>
|
|
|
+ <el-button @click="dialogVisibleOne = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="submitFormOne()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog title="跟进记录" v-model="dialogVisibleTwo" width="500">
|
|
|
<div style="width: 100%">
|
|
|
<el-timeline :reverse="false">
|
|
|
- <el-timeline-item placement="top" v-for="(activity, index) in activities" :key="index" :timestamp="activity.followUpTime">
|
|
|
+ <el-timeline-item
|
|
|
+ placement="top"
|
|
|
+ v-for="(activity, index) in activities"
|
|
|
+ :key="index"
|
|
|
+ :timestamp="activity.followUpTime"
|
|
|
+ >
|
|
|
<div>
|
|
|
跟进结果:
|
|
|
<span>{{ activity.resultType ? "已处理" : "处理中" }}</span>
|
|
@@ -132,11 +234,24 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
|
|
|
- <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
|
|
|
+ <el-dialog
|
|
|
+ title="交接单"
|
|
|
+ v-if="openHandover"
|
|
|
+ v-model="openHandover"
|
|
|
+ width="800"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formHandoverConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="productRow.data"
|
|
|
+ >
|
|
|
<template #remark>
|
|
|
<div style="width: 100%">
|
|
|
- <Editor ref="remarkEditor" :readOnly="true" :value="productRow.data.remark" />
|
|
|
+ <Editor
|
|
|
+ ref="remarkEditor"
|
|
|
+ :readOnly="true"
|
|
|
+ :value="productRow.data.remark"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #file>
|
|
@@ -145,7 +260,8 @@
|
|
|
v-model:fileList="productRow.data.fileList"
|
|
|
action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
multiple
|
|
|
- :on-preview="onPreviewFile">
|
|
|
+ :on-preview="onPreviewFile"
|
|
|
+ >
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -215,6 +331,13 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "下单时间",
|
|
|
+ prop: "contractCode",
|
|
|
+ width: "155",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "合同到账时间",
|
|
|
slot: "claimTime",
|
|
|
width: "155",
|
|
@@ -287,16 +410,18 @@ const config = computed(() => {
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy.post("/contractProduct/page", sourceList.value.pagination).then((message) => {
|
|
|
- sourceList.value.data = message.rows.map((x) => ({
|
|
|
- ...x,
|
|
|
- isCheck: true,
|
|
|
- }));
|
|
|
- sourceList.value.pagination.total = message.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/contractProduct/page", sourceList.value.pagination)
|
|
|
+ .then((message) => {
|
|
|
+ sourceList.value.data = message.rows.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ isCheck: true,
|
|
|
+ }));
|
|
|
+ sourceList.value.pagination.total = message.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
getList();
|
|
|
const productUnit = ref([]);
|
|
@@ -424,8 +549,12 @@ const formConfigOne = computed(() => {
|
|
|
});
|
|
|
|
|
|
const rulesOne = ref({
|
|
|
- resultType: [{ required: true, message: "请选择跟进结果", trigger: "change" }],
|
|
|
- followUpTime: [{ required: true, message: "请选择跟进时间", trigger: "change" }],
|
|
|
+ resultType: [
|
|
|
+ { required: true, message: "请选择跟进结果", trigger: "change" },
|
|
|
+ ],
|
|
|
+ followUpTime: [
|
|
|
+ { required: true, message: "请选择跟进时间", trigger: "change" },
|
|
|
+ ],
|
|
|
remark: [{ required: true, message: "请输入跟进记录", trigger: "blur" }],
|
|
|
});
|
|
|
|
|
@@ -599,19 +728,23 @@ const formHandoverConfig = computed(() => {
|
|
|
});
|
|
|
const remarkEditor = ref(null);
|
|
|
const handleClickDetails = (row) => {
|
|
|
- proxy.post("/flowProcess/getStartData", { flowId: row.flowId }).then(async (res) => {
|
|
|
- const current = res.contractProductList.find((x) => x.productId === row.productId);
|
|
|
- productRow.data = current || {};
|
|
|
- productRow.data.fileList =
|
|
|
- current.fileList.map((x) => ({
|
|
|
- raw: x,
|
|
|
- name: x.fileName,
|
|
|
- url: x.fileUrl,
|
|
|
- })) || [];
|
|
|
- openHandover.value = true;
|
|
|
- await nextTick();
|
|
|
- remarkEditor.value.changeHtml(productRow.data.remark);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/flowProcess/getStartData", { flowId: row.flowId })
|
|
|
+ .then(async (res) => {
|
|
|
+ const current = res.contractProductList.find(
|
|
|
+ (x) => x.productId === row.productId
|
|
|
+ );
|
|
|
+ productRow.data = current || {};
|
|
|
+ productRow.data.fileList =
|
|
|
+ current.fileList.map((x) => ({
|
|
|
+ raw: x,
|
|
|
+ name: x.fileName,
|
|
|
+ url: x.fileUrl,
|
|
|
+ })) || [];
|
|
|
+ openHandover.value = true;
|
|
|
+ await nextTick();
|
|
|
+ remarkEditor.value.changeHtml(productRow.data.remark);
|
|
|
+ });
|
|
|
};
|
|
|
const onPreviewFile = (file) => {
|
|
|
window.open(file.raw.fileUrl, "_blank");
|