|
@@ -9,7 +9,9 @@
|
|
|
<el-radio-button label="sixth">机型类别</el-radio-button>
|
|
|
<el-radio-button label="seventh">登录类型</el-radio-button>
|
|
|
<el-radio-button label="eigth">权限分类</el-radio-button>
|
|
|
- <el-radio-button label="receipt" v-if="$checkBtnRole('receipt', $route.meta.roles)">发票</el-radio-button>
|
|
|
+ <el-radio-button v-if="$checkBtnRole('receipt', $route.meta.roles)" label="receipt">发票</el-radio-button>
|
|
|
+ <el-radio-button label="warehouse">仓租费配置</el-radio-button>
|
|
|
+
|
|
|
</el-radio-group>
|
|
|
|
|
|
<div v-show="formType === 'first'">
|
|
@@ -21,7 +23,7 @@
|
|
|
size="small"
|
|
|
format="HH:mm"
|
|
|
style="width: 150px; margin: 0 10px"
|
|
|
- ></el-time-picker>
|
|
|
+ />
|
|
|
<span>的订单,订单日期计为下一天的日期</span>
|
|
|
</div>
|
|
|
<el-button type="primary" size="small" @click="submitForm('first')">确 定</el-button>
|
|
@@ -36,7 +38,7 @@
|
|
|
placeholder="请输入密码"
|
|
|
size="small"
|
|
|
style="width: 150px; margin-top: 20px"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-button type="primary" size="small" @click="submitForm('second')">确 定</el-button>
|
|
@@ -49,10 +51,10 @@
|
|
|
<el-input
|
|
|
v-model="thirdForm.input1.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 150px; margin-top: 20px; margin-right: 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
|
|
|
</div>
|
|
|
<div style="margin: 40px 0 30px">
|
|
@@ -61,10 +63,10 @@
|
|
|
<el-input
|
|
|
v-model="thirdForm.input2.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 150px; margin-top: 20px; margin-right: 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
|
|
|
</div>
|
|
|
<el-button type="primary" size="small" @click="submitForm('third')">确 定</el-button>
|
|
@@ -80,18 +82,18 @@
|
|
|
<el-input
|
|
|
v-model="fourthForm.input1.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>到</span>
|
|
|
<el-input
|
|
|
v-model="fourthForm.input2.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>,总库存显示具体数量</span>
|
|
|
</div>
|
|
|
<div style="margin-top: 10px">
|
|
@@ -99,18 +101,18 @@
|
|
|
<el-input
|
|
|
v-model="fourthForm.input3.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>到</span>
|
|
|
<el-input
|
|
|
v-model="fourthForm.input4.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>,总库存显示有货</span>
|
|
|
</div>
|
|
|
<div style="margin-top: 10px">
|
|
@@ -118,10 +120,10 @@
|
|
|
<el-input
|
|
|
v-model="fourthForm.input5.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>,总库存显示充足</span>
|
|
|
</div>
|
|
|
<div style="margin-top: 30px">发货申请查询库存时:</div>
|
|
@@ -130,10 +132,10 @@
|
|
|
<el-input
|
|
|
v-model="fourthForm.input6.dictValue"
|
|
|
type="number"
|
|
|
- @mousewheel.native.prevent
|
|
|
size="small"
|
|
|
style="width: 100px; margin: 0 10px"
|
|
|
- ></el-input>
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ />
|
|
|
<span>显示充足</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -149,7 +151,7 @@
|
|
|
placeholder="请输入密码"
|
|
|
size="small"
|
|
|
style="width: 150px; margin-top: 20px"
|
|
|
- ></el-input>
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-button type="primary" size="small" @click="submitForm('fifth')">确 定</el-button>
|
|
@@ -176,24 +178,24 @@
|
|
|
prop="dictCode"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
align="left"
|
|
|
label="备注"
|
|
|
prop="remark"
|
|
|
min-width="170"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
|
|
|
<el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
|
|
|
<el-popconfirm
|
|
|
- @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
title="这是一段内容确定删除吗?"
|
|
|
+ @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
>
|
|
|
- <el-button type="text" class="textColor" slot="reference">删除</el-button>
|
|
|
+ <el-button slot="reference" type="text" class="textColor">删除</el-button>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -223,24 +225,24 @@
|
|
|
prop="dictCode"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
align="left"
|
|
|
label="备注"
|
|
|
prop="remark"
|
|
|
min-width="170"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
|
|
|
<el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
|
|
|
<el-popconfirm
|
|
|
- @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
title="这是一段内容确定删除吗?"
|
|
|
+ @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
>
|
|
|
- <el-button type="text" class="textColor" slot="reference">删除</el-button>
|
|
|
+ <el-button slot="reference" type="text" class="textColor">删除</el-button>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -270,24 +272,24 @@
|
|
|
prop="dictCode"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
align="left"
|
|
|
label="备注"
|
|
|
prop="remark"
|
|
|
min-width="170"
|
|
|
show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
|
|
|
<el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
|
|
|
<el-popconfirm
|
|
|
- @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
title="这是一段内容确定删除吗?"
|
|
|
+ @onConfirm="deleFn(scope.row.sysDictId)"
|
|
|
>
|
|
|
- <el-button type="text" class="textColor" slot="reference">删除</el-button>
|
|
|
+ <el-button slot="reference" type="text" class="textColor">删除</el-button>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -308,20 +310,32 @@
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
style="margin: 0 10px"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
<el-button size="mini" type="warning" icon="el-icon-finished" @click="updateReceipt">更新发票</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div v-show="formType === 'warehouse'">
|
|
|
+ <div style="margin: 40px 0 30px;">
|
|
|
+ <span>总库存大于</span>
|
|
|
+ <el-input
|
|
|
+ v-model.number="stockCostDict.dictValue"
|
|
|
+ type="number"
|
|
|
+ style="width: 150px; margin: 0 10px"
|
|
|
+ placeholder=""
|
|
|
+ size="mini"
|
|
|
+ />
|
|
|
+ <span>才开始标记计算经销商订单相应机型仓租费用</span>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" size="small" @click="submitStockForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
<!-- //弹窗 -->
|
|
|
<el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
|
|
|
- <el-form size="mini" ref="addForm" :rules="rules" :model="addForm" label-width="120px">
|
|
|
+ <el-form ref="addForm" size="mini" :rules="rules" :model="addForm" label-width="120px">
|
|
|
<el-form-item label="名称" prop="dictCode">
|
|
|
- <el-input v-model="addForm.dictCode"></el-input>
|
|
|
+ <el-input v-model="addForm.dictCode" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
- <el-input v-model="addForm.remark"></el-input>
|
|
|
+ <el-input v-model="addForm.remark" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -333,7 +347,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDictList, editDictList, addDictList, deleDictList, updateReceipt } from '@/api/common'
|
|
|
+import { getDictList, editDictList, addDictList, deleDictList, updateReceipt, getStockCostDict, updateStockCostDict } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -370,6 +384,7 @@ export default {
|
|
|
fifthForm: {
|
|
|
input1: {}
|
|
|
},
|
|
|
+ stockCostDict: {},
|
|
|
sixthForm: [],
|
|
|
seventhForm: [],
|
|
|
eigthForm: [],
|
|
@@ -395,13 +410,13 @@ export default {
|
|
|
this.getDetail('first')
|
|
|
},
|
|
|
methods: {
|
|
|
- //删除
|
|
|
+ // 删除
|
|
|
async deleFn(id) {
|
|
|
await deleDictList({ id: id })
|
|
|
this.$message.success('删除成功')
|
|
|
this.getDetail(this.formType)
|
|
|
},
|
|
|
- //编辑
|
|
|
+ // 编辑
|
|
|
editFn(value) {
|
|
|
this.$nextTick(() => {
|
|
|
this.title = '编辑'
|
|
@@ -413,14 +428,14 @@ export default {
|
|
|
|
|
|
this.dialogForm = true
|
|
|
},
|
|
|
- //弹窗确定
|
|
|
+ // 弹窗确定
|
|
|
async addDataFn() {
|
|
|
// console.log(this.addForm);
|
|
|
|
|
|
await this.$refs.addForm.validate()
|
|
|
|
|
|
if (this.addForm.sysDictId) {
|
|
|
- //编辑
|
|
|
+ // 编辑
|
|
|
await editDictList([
|
|
|
{
|
|
|
...this.addForm
|
|
@@ -451,7 +466,7 @@ export default {
|
|
|
}
|
|
|
this.dialogForm = false
|
|
|
},
|
|
|
- //cancelFn 弹窗取消
|
|
|
+ // cancelFn 弹窗取消
|
|
|
async cancelFn() {
|
|
|
await this.$refs.addForm.resetFields()
|
|
|
|
|
@@ -462,13 +477,13 @@ export default {
|
|
|
this.dialogForm = false
|
|
|
// this.addForm.dictCode ='';
|
|
|
},
|
|
|
- //展示新增弹窗
|
|
|
+ // 展示新增弹窗
|
|
|
addShowFn() {
|
|
|
this.title = '新增'
|
|
|
this.dialogForm = true
|
|
|
},
|
|
|
// 查询按钮权限
|
|
|
- checkBtnRole(value) {
|
|
|
+ checkBtnRole(_value) {
|
|
|
// let btnRole = this.$route.meta.roles;
|
|
|
// if(!btnRole) {return true}
|
|
|
// let index = btnRole.indexOf(value);
|
|
@@ -478,13 +493,21 @@ export default {
|
|
|
|
|
|
changeType(val) {
|
|
|
if (this.formType === 'receipt') return
|
|
|
- console.log(val)
|
|
|
+ if (val === 'warehouse') {
|
|
|
+ this.getStockCostDict()
|
|
|
+ return
|
|
|
+ }
|
|
|
this.getDetail(val)
|
|
|
},
|
|
|
+ getStockCostDict() {
|
|
|
+ getStockCostDict().then(res => {
|
|
|
+ res.data.dictValue = +res.data.dictValue
|
|
|
+ this.stockCostDict = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
getDictList(e, type) {
|
|
|
getDictList({ sysDictEnum: e }).then(res => {
|
|
|
- console.log(res, '99')
|
|
|
- let data = res.data.map(item => {
|
|
|
+ const data = res.data.map(item => {
|
|
|
return {
|
|
|
sysDictId: item.sysDictId,
|
|
|
dictValue: item.dictValue,
|
|
@@ -549,7 +572,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
submitForm(type) {
|
|
|
- let list = []
|
|
|
+ const list = []
|
|
|
for (var key in this[type + 'Form']) {
|
|
|
console.log(this[type + 'Form'], this[type + 'Form'][key].dictValue)
|
|
|
if (!this[type + 'Form'][key].dictValue) {
|
|
@@ -559,7 +582,7 @@ export default {
|
|
|
}
|
|
|
console.log(list, '890')
|
|
|
|
|
|
- editDictList(list).then(res => {
|
|
|
+ editDictList(list).then(_res => {
|
|
|
this.$successMsg('保存成功')
|
|
|
this.getDetail(type)
|
|
|
})
|
|
@@ -572,10 +595,20 @@ export default {
|
|
|
updateReceipt({
|
|
|
startTime: this.value1[0],
|
|
|
endTime: this.value1[1]
|
|
|
- }).then(res => {
|
|
|
+ }).then(_res => {
|
|
|
this.$successMsg('已更新')
|
|
|
this.value1 = ''
|
|
|
})
|
|
|
+ },
|
|
|
+ submitStockForm() {
|
|
|
+ if (!this.stockCostDict.dictValue) {
|
|
|
+ this.$errorMsg('请输入总库存')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ updateStockCostDict({ dictValue: this.stockCostDict.dictValue }).then(_res => {
|
|
|
+ this.getStockCostDict()
|
|
|
+ this.$successMsg('已更新')
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|