|
@@ -19,15 +19,8 @@
|
|
|
<el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
|
|
|
<cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="onSubmit">
|
|
|
<template #file>
|
|
|
- <cUpload
|
|
|
- :model="`${'file'}`"
|
|
|
- :limit="6"
|
|
|
- listType="picture"
|
|
|
- url="/files/material/goods/upload"
|
|
|
- accept="*"
|
|
|
- :list="form.file"
|
|
|
- @change="onUpload"
|
|
|
- ></cUpload>
|
|
|
+ <cUpload :model="`${'file'}`" :limit="6" listType="picture" url="/files/material/goods/upload" accept="*"
|
|
|
+ :list="form.file" @change="onUpload"></cUpload>
|
|
|
</template>
|
|
|
<template #supplier_id>
|
|
|
<el-option v-for="i in supplierList" :key="i._id" :label="i.name" :value="i._id"></el-option>
|
|
@@ -152,8 +145,8 @@ const getDict = (value: any, model: any) => {
|
|
|
};
|
|
|
// 上传图片
|
|
|
const onUpload = (e: { model: string; value: Array<[]> }) => {
|
|
|
- const { model, value } = e;
|
|
|
- form.value[model] = value;
|
|
|
+ const { value } = e;
|
|
|
+ form.value.file = value;
|
|
|
};
|
|
|
// 商品规格
|
|
|
const toSpec = (data: any) => {
|