报价单配件加上价格和同步
This commit is contained in:
parent
cba9c9df13
commit
c1a2a56c84
|
|
@ -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
|
||||
|
|
@ -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); // 转换为时间戳
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
<page-layout :desc="desc">
|
||||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
|
|
@ -18,20 +17,18 @@
|
|||
<a-button @click="cancel">取消</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</page-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/Middle/bathroom/BathroomParts/api.js';
|
||||
import PageLayout from '@/layouts/PageLayout'
|
||||
import BASE_URL from '@/services/Middle/bathroom/BathroomParts/api.js';
|
||||
|
||||
|
||||
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: 'supplier', title: '供应商', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'remark', title: '备注', span: 12, itemRender: { name: '$input' } },
|
||||
|
||||
// =============================== 表单项 自动生成 End ===============================
|
||||
|
|
|
|||
|
|
@ -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); // 提示错误信息
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 编辑
|
||||
|
|
|
|||
|
|
@ -1562,8 +1562,11 @@ export default {
|
|||
parts_onPulldownSelected({ selectedData, row }) {
|
||||
console.log(row, selectedData);
|
||||
if (selectedData.spec) {
|
||||
row.spec = selectedData.spec;
|
||||
//TODO 带过来单价
|
||||
row.spec = selectedData.spec;
|
||||
}
|
||||
if(selectedData.price){
|
||||
row.price = selectedData.price;
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1123,8 +1123,11 @@ export default {
|
|||
console.log(row, selectedData);
|
||||
if (selectedData.spec) {
|
||||
row.spec = selectedData.spec;
|
||||
|
||||
//TODO 带过来单价
|
||||
|
||||
}
|
||||
if(selectedData.price){
|
||||
row.price = selectedData.price;
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -854,10 +854,12 @@ export default {
|
|||
console.log(row, selectedData);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const routerMap = {
|
|||
routerMap[FunName]= {
|
||||
name: FunTitle,
|
||||
icon: 'idcard',
|
||||
component: view.page,
|
||||
component: view.blank,
|
||||
meta: {
|
||||
},
|
||||
authority: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue