Commit 3b71b8da authored by wanglianghe's avatar wanglianghe

仓储设置

parent a9b5f677
import request from '@/utils/request'
// 创建全局配置
export function createSetting(data) {
return request({
url: '/ecw/setting/create',
method: 'post',
data: data
})
}
// 获得全局配置分页
export function getSettingList(data) {
return request({
url: '/ecw/setting/list',
method: 'post',
data: data
})
}
......@@ -60,6 +60,7 @@ export const DICT_TYPE = {
ECW_DATA_SOURCE: 'data_source', // 数据来源
ECW_REGION_TYPE: 'region_trade_type', // 区域类型
ECW_TRANSPORT_TYPE: 'transport_type', //货运方式
ECW_CHARGE_TYPE: 'warehouse_charge_type', //仓储收费方式
}
/**
......
<template>
<div class="app-container">
<el-row :gutter="15">
<el-form ref="setForm" :model="formData" size="medium" label-width="100px">
<el-col :span="19">
<el-form-item label-width="245px" label="每个客户占用货架超过盘点:" prop="shelvesNum">
<el-input v-model="formData.shelvesNum" :style="{width: '30%'}" />&nbsp;&nbsp;
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="每个客户占用货架区域超过盘点:" prop="shelvesAreaNum">
<el-input v-model="formData.shelvesAreaNum" :style="{width: '30%'}" />&nbsp;&nbsp;
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="入库超时预警 超过:" prop="rkOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="上架超时预警 超过:" prop="sjOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="在仓超时预警 超过:" prop="zcOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="打包超时预警 超过:" prop="dbOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="待出库超时预警 超过:" prop="dckOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="仓租费类型:" prop="chargeType">
<el-radio-group v-model="formData.chargeType">
<el-radio v-for="item in chargeDictDatas" :key="item.value" :label="item.label">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="19">
<el-form-item label-width="245px" label="仓租费设置:" prop="fee">
<el-input v-model="formData.fee" :style="{width: '30%'}" />&nbsp;&nbsp;$
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
</div>
</template>
<script>
import { createSetting, getSettingList } from "@/api/ecw/setting";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
export default {
name: "Setting",
components: {
},
data() {
return {
formData:{
//
},
chargeDictDatas: getDictDatas(DICT_TYPE.ECW_CHARGE_TYPE),
};
},
created() {
this.getList();
console.log(this.chargeDictDatas);
},
methods: {
/** 查询列表 */
getList() {
getSettingList({type:'warehouse'}).then(response => {
let list = response.data.list;
console.log(list);
})
},
/** 表单重置 */
resetForm() {
this.formData = {};
},
/** 提交按钮 */
submitForm() {
let settingList = [];
let shelvesNum = {keyName: 'shelvesNum', keyValue: this.formData.shelvesNum, keyType:'warehouse'};
let shelvesAreaNum = {keyName: 'shelvesAreaNum', value: this.formData.shelvesAreaNum, keyType:'warehouse'};
let rkOverDay = {keyName: 'rkOverDay', keyValue: this.formData.rkOverDay, keyType:'warehouse'};
let sjOverDay = {keyName: 'sjOverDay', keyValue: this.formData.sjOverDay, keyType:'warehouse'};
let zcOverDay = {keyName: 'zcOverDay', keyValue: this.formData.zcOverDay, keyType:'warehouse'};
let dbOverDay = {keyName: 'dbOverDay', keyValue: this.formData.dbOverDay, keyType:'warehouse'};
let dckOverDay = {keyName: 'dckOverDay', keyValue: this.formData.dckOverDay, keyType:'warehouse'};
let chargeType = {keyName: 'chargeType', keyValue: this.formData.chargeType, keyType:'warehouse'};
let fee = {keyName: 'fee', keyValue: this.formData.fee, keyType:'warehouse'};
settingList.push(shelvesNum);
settingList.push(shelvesAreaNum);
settingList.push(rkOverDay);
settingList.push(sjOverDay);
settingList.push(zcOverDay);
settingList.push(dbOverDay);
settingList.push(dckOverDay);
settingList.push(chargeType);
settingList.push(fee);
createSetting({settingList:settingList}).then(response => {
this.$modal.msgSuccess("操作成功");
});
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment