1
This commit is contained in:
+52
-86
@@ -15,76 +15,21 @@
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
|
||||
<!-- 产品列表 -->
|
||||
<view class="quote" v-for="(item,index) in sheet.productList" :key="index">
|
||||
<el-descriptions class="description" :title="'采购商品' + (index + 1)" :column="3"
|
||||
size="medium" border >
|
||||
<el-descriptions-item label="商品">
|
||||
{{item.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-for="(attr, aindex) in item.extraAttributes" :label="attr.keyName"
|
||||
:key="aindex">
|
||||
{{attr.keyValue}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌厂家">
|
||||
{{item.brand}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="材质">
|
||||
{{item.materialQuality}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单件长度">
|
||||
{{item.singleLength}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品标准">
|
||||
{{item.productStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计价形式">
|
||||
{{item.pricingForm}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="加工标准">
|
||||
{{item.processStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货服务">
|
||||
{{item.deliveryService}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货时限">
|
||||
{{item.deliveryTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采购数量">
|
||||
{{item.procureNumber}}{{item.procureUnit}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货地点">
|
||||
{{item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<view class="quote-form">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="报价单价">
|
||||
<vk-data-input-money v-model="item.unitPrice" placeholder="请输入单价" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
<el-form-item label="小计金额">
|
||||
<vk-data-input-money :readonly="true" :value="item.unitPrice * item.procureNumber" placeholder="" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<el-form label-width="120px" :inline="true">
|
||||
<el-form-item label="报价总价">
|
||||
<vk-data-input-money :readonly="true" :value="totalPrice" placeholder="请输入单价" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
<el-form-item label="人民币大写">
|
||||
<el-input :readonly="true" :value="totalPriceStr" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<view class="form-footer">
|
||||
<el-button type="primary" @click="submit">提交报价单</el-button>
|
||||
</view>
|
||||
<vk-data-form
|
||||
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"
|
||||
:auto-close="true"
|
||||
label-width="140px"
|
||||
@success="onFormSuccess"
|
||||
></vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -92,21 +37,46 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
enquiryId: undefined,
|
||||
// productList: [],
|
||||
sheetTitle: '',
|
||||
sheet: {
|
||||
productList: []
|
||||
},
|
||||
// totalPriceStr: ''
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
radio: 1,
|
||||
checkbox : [1,2]
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "template/test/sys/test",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{ key: "totalPrice", title: "货款总价", type: "money" },
|
||||
{ key: "totalPriceStr", title: "人民币大写", type: "text" },
|
||||
{ key: "remark", title: "报价单详情", type: "editor" },
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{ required: true, message: "text不能为空", trigger: "change" },
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
enquiryId
|
||||
sheetId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/enquiry/list');
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
@@ -115,14 +85,7 @@
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
totalPrice() {
|
||||
let price = 0
|
||||
this.sheet.productList.forEach(item => {
|
||||
price += item.unitPrice * item.procureNumber
|
||||
})
|
||||
|
||||
return price
|
||||
},
|
||||
|
||||
totalPriceStr() {
|
||||
if(this.totalPrice == 0) {
|
||||
return "零元"
|
||||
@@ -131,6 +94,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user