签章流程

This commit is contained in:
2023-11-17 13:50:18 +08:00
parent 1358e52fdb
commit 715859c63f
72 changed files with 8660 additions and 339 deletions
+197 -25
View File
@@ -1,7 +1,7 @@
<template>
<view>
<!-- <view class="product-title">{{title}}</view> -->
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
<vk-data-form v-if="attributesLoaded" ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
:rules="form1.props.rules" :form-type="form1.props.formType" :loading.sync="form1.props.loading"
:before-action="form1.props.beforeAction" :auto-close="true" label-width="140px" :footer-show="false"
@success="onFormSuccess">
@@ -33,6 +33,8 @@
data() {
return {
title: '商品',
attributesLoaded: false,
attributes: [],
// 表单相关开始-----------------------------------------------------------
form1: {
// 表单请求数据,此处可以设置默认值
@@ -58,26 +60,34 @@
},
props: {
list: "rows",
value: "_id",
value: "name",
label: "name"
},
watch: (res) => {
const {
option
} = res
this.form1.props.columns[2].columns = option.extraAttributes.map((item, index) => {
return {
key: index,
title: item.lable,
type: "select",
data: item.values.map(citem => {
return {
value: JSON.stringify({keyName: item.lable,keyValue: citem}),
label: citem
}
})
}
})
console.log(option);
if(option.extraAttributes) {
this.form1.props.columns[2].columns = option.extraAttributes.map((item, index) => {
return {
key: index,
title: item.label,
type: "select",
allowCreate: true,
filterable: true,
data: item.values.map(citem => {
return {
value: JSON.stringify({keyName: item.lable,keyValue: citem}),
label: citem
}
})
}
})
}else {
this.form1.props.columns[2].columns = []
}
}
@@ -93,15 +103,159 @@
],
},
{
key: "attributes",
title: "固定属性",
type: "object",
// justify: "start",
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "brand",
title: "品牌厂家",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '品牌厂家')
if(row) {
return row.options
}
return [];
}
},
{
key: "materialQuality",
title: "材质",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '材质')
if(row) {
return row.options
}
return [];
}
},
],
},
{
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "singleLength",
title: "单件长度",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '单件长度')
if(row) {
return row.options
}
return [];
}
},
{
key: "productStandard",
title: "产品标准",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '产品标准')
if(row) {
return row.options
}
return [];
}
},
],
},
{
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "pricingForm",
title: "计价形式",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '计价形式')
if(row) {
return row.options
}
return [];
}
},
{
key: "processStandard",
title: "加工标准",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '加工标准')
if(row) {
return row.options
}
return [];
}
},
],
},
{
key: "",
title: "",
type: "group",
justify: "start",
showLabel: false,
columns: [
{
key: "deliveryService",
title: "交货服务",
type: "select",
showAll: true,
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '交货服务')
if(row) {
return row.options
}
return [];
}
},
{key: "deliveryTime", title: "交货时限", type: "date",},
]
},
{
key: "",title: "",type: 'group',showLabel: false, justify: "start",columns:
[
@@ -109,18 +263,24 @@
{
key: "procureUnit",
title: "单位",
type: "remote-select",
type: "select",
showAll: true,
action: "client/enquiry/attributes/pub/getOne",
actionData: {
label: '单位',
},
allowCreate: true,
filterable: true,
data: () => {
const row = this.attributes.find(item => item.label == '单位')
if(row) {
return row.options
}
return [];
}
},
]
},
{key: "deliveryTime", title: "交货时限", type: "date",},
{
key: "address",
title: "交货地点",
@@ -157,6 +317,18 @@
},
created() {
this.form1.props.columns[0].title = '商品' + (this.productIndex + 1)
vk.callFunction({
url: 'client/enquiry/attributes/pub/getList',
title: '请求中...',
data: {
},
success: (data) => {
this.attributes = data.rows
this.attributesLoaded = true
}
});
},
methods: {