报价单配件加上价格和同步

This commit is contained in:
xielue 2023-04-25 13:12:21 +08:00
parent cba9c9df13
commit c1a2a56c84
8 changed files with 60 additions and 19 deletions

View File

@ -2,4 +2,4 @@
VUE_APP_API_BASE_URL=http://zxx4.f3322.net:46000
VUE_APP_USER_MODEL2=AdminUser
VUE_APP_USER_MODEL=BaseAdmin
VUE_APP_BEID=3
VUE_APP_BEID=1

View File

@ -9,6 +9,9 @@ export default {
if (rule.dataRule && rule.dataRule.type == "integer") { // 如果是整数
data[rule.field] = parseInt(value); // 转换为整数
}
if (rule.dataRule && rule.dataRule.type == "number") { // 如果是整数
data[rule.field] = parseFloat(value); // 转换为整数
}
if (rule.dataRule && rule.dataRule.type == "timestamp") { // 如果是时间戳
data[rule.field] = parseInt(new Date(data[rule.field]).getTime() / 1000); // 转换为时间戳
}

View File

@ -1,5 +1,4 @@
<template>
<page-layout :desc="desc">
<div class="page-body">
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
@ -19,19 +18,17 @@
</div>
</div>
</page-layout>
</template>
<script>
import BASE_URL from '@/services/Middle/bathroom/BathroomParts/api.js';
import PageLayout from '@/layouts/PageLayout'
export default {
name: 'BathroomPartsUpdate',
i18n: require('./i18n'),
components: { PageLayout },
components: { },
props: {
pageMode: {
type: String,
@ -115,13 +112,14 @@ export default {
// =============================== Start ===============================
{ field: 'name', title: '配件名称', span: 12, itemRender: { name: '$input' } },
{ field: 'price', title: '价格', dataRule: { type: "number" }, span: 12, itemRender: { name: '$input',props:{type:"number"} } },
{ field: 'quoted_price', title: '采购价', dataRule: { type: "number" }, span: 12, itemRender: { name: '$input',props:{type:"number"} } },
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
{ field: 'brand', title: '配件品牌', span: 12, itemRender: { name: '$input' } },
{ field: 'model', title: '配件型号', span: 12, itemRender: { name: '$input' } },
{ field: 'spec', title: '配件规格', span: 12, itemRender: { name: '$input' } },
{ field: 'unit', title: '单位', span: 12, itemRender: { name: '$input' } },
{ field: 'supplier', title: '供应商', span: 12, itemRender: { name: '$input' } },
{ field: 'image', title: '图片', span: 12, itemRender: { name: '$input' } },
{ field: 'remark', title: '备注', span: 12, itemRender: { name: '$input' } },
// =============================== End ===============================

View File

@ -16,7 +16,7 @@
</a-col>
<a-col :flex="$mk.config.ui.toolbarFlex">
<!-- 工具条 -->
<mk-toolbar @toolbarClick="toolbarClick"></mk-toolbar>
<mk-toolbar @toolbarClick="toolbarClick" :buttons="toolbar_btns" :isShowLog="false" :isShowSetting="false"></mk-toolbar>
</a-col>
</a-row>
@ -69,7 +69,10 @@ export default {
var pageData = { //
keyName: 'id', //
toolbar_btns:[
{name :"数据同步",label:"数据同步"}
],
//
actions: { // Api
@ -86,6 +89,9 @@ export default {
BathroomPartsImportExcel: `${BASE_URL.BASE_URL}/BathroomParts/v1/bathroom/parts/import/excel`, // EXCEL
// =============================== End ===============================
sync:`${BASE_URL.BASE_URL}/BathroomParts/v1/bathroom/parts/sync`
},
start_time: 0, //
@ -164,6 +170,13 @@ export default {
// =============================== Start ===============================
{ field: 'name', sortable: true, title: '配件名称', width: 250 }, //
{ field: 'price', sortable: true, title: '价格', width: 150 },
{ field: 'quoted_price', sortable: true, title: '采购价', width: 150 },
{ field: 'code', sortable: true, title: '编码', width: 250 }, //
{ field: 'brand', sortable: true, title: '配件品牌', width: 250 }, //
{ field: 'model', sortable: true, title: '配件型号', width: 250 }, //
@ -273,6 +286,25 @@ export default {
if (e.name == "add") { //
this.$openPage("/BathroomParts/BathroomPartsAdd"); //
}
if(e.name == '数据同步'){
this.$mk.post({
url: this.actions.sync, //
loading: "数据同步中...", //
data: {
}
}).then(() => { //
this.$mk.success("同步成功"); //
setTimeout(()=>{
this.onSearch();
},3000);
}).catch((a) => { //
this.$mk.error(a.data.msg); //
});
}
},
//

View File

@ -1563,7 +1563,10 @@ export default {
console.log(row, selectedData);
if (selectedData.spec) {
row.spec = selectedData.spec;
//TODO
}
if(selectedData.price){
row.price = selectedData.price;
}
},

View File

@ -1124,7 +1124,10 @@ export default {
if (selectedData.spec) {
row.spec = selectedData.spec;
//TODO
}
if(selectedData.price){
row.price = selectedData.price;
}
},

View File

@ -855,9 +855,11 @@ export default {
if(selectedData.spec){
row.spec = selectedData.spec;
//TODO
}
if(selectedData.price){
row.price = selectedData.price;
}
},
parts_onPopupSelected({ rows, name, params }) {
console.log(rows, name, params);

View File

@ -17,7 +17,7 @@ const routerMap = {
routerMap[FunName]= {
name: FunTitle,
icon: 'idcard',
component: view.page,
component: view.blank,
meta: {
},
authority: {