Compare commits
5 Commits
ecaadfc5d1
...
xiaozy_产品列
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56cf799cfb | ||
|
|
0b9076df67 | ||
|
|
a9d14aedb4 | ||
|
|
6fdc081c61 | ||
|
|
343bed9eab |
@@ -30,7 +30,7 @@
|
||||
<template>
|
||||
<el-option
|
||||
v-for="(item, index) in list"
|
||||
:key="item.id + index"
|
||||
:key="index"
|
||||
:label="item[config.labelKey]"
|
||||
:value="item[config.valueKey]"
|
||||
>
|
||||
@@ -66,7 +66,8 @@ export default {
|
||||
handler(nval, oval) {
|
||||
this.list = [];
|
||||
// this.isDisabled = !!this.config.isDisabled;
|
||||
if (nval) {
|
||||
let type = this.$utils.typeJudgment(this.config.echoName);
|
||||
if (nval && ["String"].includes(type)) {
|
||||
let resultName = this.config.echoName.replace(/\s*/g, "");
|
||||
if (!resultName) return;
|
||||
this.remoteMethod(resultName);
|
||||
|
||||
@@ -85,13 +85,15 @@
|
||||
<el-link type="primary" :underline="false" @click="complete(row)"
|
||||
>完成
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
<el-popconfirm
|
||||
v-if="tableData.length > 1"
|
||||
@click="deleteRow($index, row)"
|
||||
>删除
|
||||
</el-link>
|
||||
title="确定删除吗?"
|
||||
@confirm="deleteRow($index, row)"
|
||||
>
|
||||
<el-link slot="reference" type="primary" :underline="false"
|
||||
>删除
|
||||
</el-link>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -56,18 +56,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="parameter.params.companyType"
|
||||
placeholder="账户类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in companyNatureTypeEnum"
|
||||
v-for="(item, index) in companyTypeEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
|
||||
<!-- 企业负责人或联系方式 -->
|
||||
<autocomplete
|
||||
@@ -332,13 +332,13 @@
|
||||
</p>
|
||||
</template>
|
||||
<template #companyNature>
|
||||
<!-- <p v-if="oilCompanyMatch[0]">
|
||||
<p v-if="oilCompanyMatch[0]">
|
||||
{{
|
||||
companyNatureEnum.find(
|
||||
(item) => item.value === oilCompanyMatch[0].companyNature
|
||||
).label
|
||||
}}
|
||||
</p> -->
|
||||
</p>
|
||||
</template>
|
||||
<template #companyDockType>
|
||||
<p>
|
||||
@@ -501,7 +501,8 @@ export default {
|
||||
querykey: "companyName",
|
||||
},
|
||||
configAutocompleteHead: {
|
||||
serveTarget: commonServe.getCompanyNames,
|
||||
serveTarget: commonServe.getRefineryCompanyList,
|
||||
autocompleteKey: "name",
|
||||
labelKey: "name",
|
||||
valueKey: "name",
|
||||
placeholder: "总公司名称",
|
||||
@@ -521,6 +522,28 @@ export default {
|
||||
total: 0,
|
||||
params: {},
|
||||
},
|
||||
companyTypeEnum: [
|
||||
{
|
||||
label: "柴油账户",
|
||||
value: "0",
|
||||
},
|
||||
{
|
||||
label: "汽油账户",
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
label: "LNG账户",
|
||||
value: "2",
|
||||
},
|
||||
{
|
||||
label: "尿素账户",
|
||||
value: "3",
|
||||
},
|
||||
{
|
||||
label: "油批账户",
|
||||
value: "4",
|
||||
},
|
||||
],
|
||||
auditMarkEnum: [
|
||||
{
|
||||
label: "未提交",
|
||||
@@ -671,6 +694,7 @@ export default {
|
||||
this.getByPage();
|
||||
},
|
||||
getByPage() {
|
||||
this.parameter.params.companyType = "4";
|
||||
serve.getByPage(this.parameter).then((res) => {
|
||||
this.tableData = res.data.list;
|
||||
this.parameter.total = res.data.totalCount;
|
||||
|
||||
@@ -355,13 +355,7 @@ export default {
|
||||
examine: false,
|
||||
},
|
||||
accountStatusEnum: accountStatusEnum,
|
||||
rechargeTypeEnum: [
|
||||
{
|
||||
label: "圈回",
|
||||
value: "TURN",
|
||||
},
|
||||
...rechargeTypeEnum,
|
||||
],
|
||||
rechargeTypeEnum: rechargeTypeEnum,
|
||||
rechargeStatusEnum: rechargeStatusEnum,
|
||||
auditMarkEnum: [
|
||||
{
|
||||
|
||||
@@ -36,7 +36,11 @@
|
||||
placeholder="请选择炼厂"
|
||||
></el-autocomplete> -->
|
||||
|
||||
<autocomplete :params="form" :config="configAutocomplete" />
|
||||
<autocomplete
|
||||
ref="autocomplete"
|
||||
:params="form"
|
||||
:config="configAutocomplete"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属炼厂库名" prop="belongLibrary">
|
||||
<el-input
|
||||
@@ -203,6 +207,7 @@ export default {
|
||||
this.form = {};
|
||||
this.controlWindows.addInfo = {};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.autocomplete.list = [];
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.add = false;
|
||||
});
|
||||
|
||||
@@ -41,14 +41,28 @@ export default {
|
||||
controlWindows: Object,
|
||||
},
|
||||
data() {
|
||||
let validatorFloorPrice = (rule, value, callback) => {
|
||||
if (!value || !+value) return callback("成本价价不能为0或空");
|
||||
callback();
|
||||
};
|
||||
let validatorSalePrice2company = (rule, value, callback) => {
|
||||
if (!value || !+value) return callback("企业销售价不能为0或空");
|
||||
if (value < this.form.floorPrice)
|
||||
return callback("企业销售价不能低于成本价");
|
||||
callback();
|
||||
};
|
||||
return {
|
||||
form: {},
|
||||
rules: {
|
||||
floorPrice: [
|
||||
{ required: true, message: "请输入成本价", trigger: "blur" },
|
||||
{ required: true, validator: validatorFloorPrice, trigger: "change" },
|
||||
],
|
||||
salePrice2company: [
|
||||
{ required: true, message: "请输入企业销售价", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
validator: validatorSalePrice2company,
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</p></template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="个人销售价">
|
||||
<!-- <el-table-column label="个人销售价">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="row.salePrice2personal">
|
||||
{{ row.salePrice2personal }}/{{ row.measurement }}
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ row.lastSalePrice2personal }}/{{ row.measurement }}
|
||||
</p></template
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="时间" width="235">
|
||||
<template slot-scope="{ row }">
|
||||
<p class="gray">
|
||||
|
||||
@@ -97,19 +97,19 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="refineryLevel" label="成本价" width="70">
|
||||
<el-table-column prop="refineryLevel" label="成本价" width="110">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.floorPrice|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
|
||||
{{ row.floorPrice | toNumberFixed }}/{{ row.measurement }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="refineryLevel" label="企业销售价" width="100">
|
||||
<el-table-column prop="refineryLevel" label="企业销售价" width="110">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.salePrice2company|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
|
||||
{{ row.salePrice2company | toNumberFixed }}/{{ row.measurement }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="refineryLevel" label="个人销售价" width="100">
|
||||
<el-table-column prop="refineryLevel" label="个人销售价" width="110">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.salePrice2personal|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
|
||||
{{ row.salePrice2personal | toNumberFixed }}/{{ row.measurement }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" width="235">
|
||||
@@ -142,7 +142,12 @@
|
||||
<el-dropdown-item command="record">调价记录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<span v-show="row.enableMark=='ENABLE'" class="el-dropdown-link" @click="updateCreate(row)">下单</span>
|
||||
<span
|
||||
v-show="row.enableMark == 'ENABLE'"
|
||||
class="el-dropdown-link"
|
||||
@click="updateCreate(row)"
|
||||
>下单</span
|
||||
>
|
||||
<el-dropdown
|
||||
@command="
|
||||
(val) => {
|
||||
@@ -232,12 +237,14 @@ export default {
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
filters:{
|
||||
toNumberFixed(val){
|
||||
if(val){
|
||||
return Number(val).toFixed(2)
|
||||
}else{return '暂无'}
|
||||
}
|
||||
filters: {
|
||||
toNumberFixed(val) {
|
||||
if (val) {
|
||||
return Number(val).toFixed(2);
|
||||
} else {
|
||||
return "暂无";
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -347,19 +354,19 @@ export default {
|
||||
|
||||
//下单
|
||||
createOrder(row) {
|
||||
this.controlWindows.addInfo = {}
|
||||
this.controlWindows.addInfo = {};
|
||||
this.controlWindows.addInfo.title = "创建订单";
|
||||
this.controlWindows.create = true;
|
||||
console.log(this.controlWindows,'新增')
|
||||
console.log(this.controlWindows, "新增");
|
||||
},
|
||||
//修改订单
|
||||
updateCreate(row){
|
||||
updateCreate(row) {
|
||||
this.controlWindows.addInfo = {
|
||||
title: "创建订单",
|
||||
...row,
|
||||
};
|
||||
this.controlWindows.create = true;
|
||||
console.log('修改')
|
||||
title: "创建订单",
|
||||
...row,
|
||||
};
|
||||
this.controlWindows.create = true;
|
||||
console.log("修改");
|
||||
},
|
||||
//详情
|
||||
detail(row) {
|
||||
@@ -390,17 +397,32 @@ export default {
|
||||
},
|
||||
//启用禁用
|
||||
switchTrigger(val, row) {
|
||||
row.enableMark = row.enableMark;
|
||||
row.enableMark = val === "ENABLE" ? "DISENABLE" : "ENABLE";
|
||||
// return;
|
||||
serve
|
||||
.update({
|
||||
id: row.id,
|
||||
enableMark: val,
|
||||
})
|
||||
.updateBatchEnable([
|
||||
{
|
||||
id: row.id,
|
||||
enableMark: val,
|
||||
},
|
||||
])
|
||||
.then((res) => {
|
||||
if (res.code === 20000) {
|
||||
this.getByPage();
|
||||
} else this.$message.error(res.msg);
|
||||
}
|
||||
// this.$message.success(res.msg);
|
||||
// this.closeWindow();
|
||||
});
|
||||
// serve
|
||||
// .update({
|
||||
// id: row.id,
|
||||
// enableMark: val,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// if (res.code === 20000) {
|
||||
// this.getByPage();
|
||||
// } else this.$message.error(res.msg);
|
||||
// });
|
||||
},
|
||||
//批量启用禁用
|
||||
batchHandler() {
|
||||
|
||||
@@ -27,7 +27,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="炼厂名称" prop="refineryId">
|
||||
<autocomplete :params="form" :config="configAutocomplete" />
|
||||
<autocomplete
|
||||
ref="autocomplete"
|
||||
:params="form"
|
||||
:config="configAutocomplete"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -104,6 +108,7 @@ export default {
|
||||
this.form = {};
|
||||
this.controlWindows.addInfo = {};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.autocomplete.list = [];
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.add = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user