|
@@ -22,7 +22,7 @@
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
<template #details>
|
|
|
<div style="width: 100%">
|
|
|
- <el-button type="primary" @click="openProduct = true">添加明细</el-button>
|
|
|
+ <el-button type="primary" @click="openProduct = true" :disabled="['100','103'].includes(formData.data.type)">添加明细</el-button>
|
|
|
<el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="图片" width="70" align="center">
|
|
|
<template #default="{ row, $index }">
|
|
@@ -48,12 +48,12 @@
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
|
|
|
<el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="1"
|
|
|
- onmousewheel="return false;" />
|
|
|
+ onmousewheel="return false;" :disabled="['100','103'].includes(formData.data.type)" />
|
|
|
</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" v-if="!['100','103'].includes(formData.data.type)">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-button type="primary" link @click="handleDelete($index)">删除</el-button>
|
|
|
</template>
|
|
@@ -247,7 +247,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "备注",
|
|
|
- prop: "remark",
|
|
|
+ prop: "remarks",
|
|
|
"min-width": 200,
|
|
|
},
|
|
|
},
|
|
@@ -314,6 +314,7 @@ const getDict = () => {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
lendDataOne.value = res.rows.map((x) => ({
|
|
|
+ ...x,
|
|
|
label:
|
|
|
// x.code +
|
|
|
// " " +
|
|
@@ -390,6 +391,7 @@ const formConfig = computed(() => {
|
|
|
required: true,
|
|
|
data: inBoundReason.value,
|
|
|
fn: (val) => {
|
|
|
+ formData.data.list = [];
|
|
|
if (["101", "102", "108", "109"].includes(val)) {
|
|
|
formData.data.borrowId = "";
|
|
|
formData.data.loseId = "";
|
|
@@ -420,6 +422,34 @@ const formConfig = computed(() => {
|
|
|
filterable: true,
|
|
|
itemWidth: 50,
|
|
|
isShow: formData.data.type == "100",
|
|
|
+ fn: (val) => {
|
|
|
+ if (val) {
|
|
|
+ proxy.post("/stockJournal/detail", { id: val }).then((res) => {
|
|
|
+ if (res.list && res.list.length < 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let ids = res.list.map((x) => x.productId);
|
|
|
+ formData.data.list = res.list.map((x) => ({
|
|
|
+ fileUrl: "",
|
|
|
+ productCode: x.productCode,
|
|
|
+ productId: x.productId,
|
|
|
+ productName: x.productName,
|
|
|
+ productLength: x.productLength,
|
|
|
+ productWidth: x.productWidth,
|
|
|
+ productHeight: x.productHeight,
|
|
|
+ quantity: x.quantity,
|
|
|
+ }));
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: ids,
|
|
|
+ data: formData.data.list,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
@@ -429,6 +459,32 @@ const formConfig = computed(() => {
|
|
|
filterable: true,
|
|
|
itemWidth: 50,
|
|
|
isShow: formData.data.type == "103",
|
|
|
+ fn: (val) => {
|
|
|
+ const current = lendDataOne.value.find((x) => x.value == val);
|
|
|
+ if (current && current.materialId) {
|
|
|
+ let ids = [current.materialId];
|
|
|
+ formData.data.list = [
|
|
|
+ {
|
|
|
+ fileUrl: "",
|
|
|
+ productCode: current.materialCode,
|
|
|
+ productId: current.materialId,
|
|
|
+ productName: current.materialName,
|
|
|
+ productLength: current.materialLength,
|
|
|
+ productWidth: current.materialWidth,
|
|
|
+ productHeight: current.materialHeight,
|
|
|
+ quantity: current.quantity,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: ids,
|
|
|
+ data: formData.data.list,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "fileList",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|