pull/5/head
lixuan 2 years ago
commit fe2721936a
  1. 5
      src/components/autocomplete/index.vue
  2. 14
      src/views/customerManagement/companyManagement/components/bank.vue
  3. 63
      src/views/customerManagement/companyManagement/index.vue
  4. 8
      src/views/financialCenter/enterpriseRecharge/index.vue
  5. 7
      src/views/product/components/add.vue
  6. 18
      src/views/product/components/adjust.vue
  7. 4
      src/views/product/components/record.vue
  8. 76
      src/views/product/index.vue
  9. 7
      src/views/refineryAccount/components/add.vue

@ -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>

@ -28,7 +28,7 @@
clearable
>
<el-option
v-for="(item, index) in companyNatureTypeEnum"
v-for="(item, index) in companyNatureTypeEnum.slice(1)"
:key="index"
:label="item.label"
:value="item.value"
@ -49,25 +49,25 @@
clearable
>
<el-option
v-for="(item, index) in auditMarkEnum"
v-for="(item, index) in auditMarkEnum.slice(1)"
:key="index"
:label="item.label"
:value="item.value"
/>
</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
@ -300,7 +300,7 @@
<!-- 新增 -->
<add
:controlWindows="controlWindows"
:companyNatureTypeEnum="companyNatureTypeEnum"
:companyNatureTypeEnum="companyNatureTypeEnum.slice(1)"
@closeWindow="search"
/>
<!-- 认证 -->
@ -332,16 +332,17 @@
</p>
</template>
<template #companyNature>
<!-- <p v-if="oilCompanyMatch[0]">
{{
companyNatureEnum.find(
<p>
<!-- {{
companyNatureTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].companyNature
).label
}}
</p> -->
}} -->
</p>
</template>
<template #companyDockType>
<p>
<p v-if="oilCompanyMatch[0].companyDockType === null"></p>
<p v-else>
{{
oilCompanyMatch[0].companyDockType == 0 ? "对接客户" : "平台客户"
}}
@ -356,7 +357,7 @@
<p>
{{
auditMarkEnum.find(
(item) => item.value == oilCompanyMatch[0].enableMark
(item) => item.value == oilCompanyMatch[0].auditMark
).label
}}
</p>
@ -386,7 +387,7 @@
<template #accountState>
<p v-if="oilCompanyMatch[3]">
{{
accountStatusEnum.find(
companyTypeEnum.find(
(item) => item.value === oilCompanyMatch[3].accountState
).label
}}
@ -501,7 +502,8 @@ export default {
querykey: "companyName",
},
configAutocompleteHead: {
serveTarget: commonServe.getCompanyNames,
serveTarget: commonServe.getRefineryCompanyList,
autocompleteKey: "name",
labelKey: "name",
valueKey: "name",
placeholder: "总公司名称",
@ -521,7 +523,33 @@ export default {
total: 0,
params: {},
},
companyTypeEnum: [
{
label: "柴油账户",
value: "0",
},
{
label: "汽油账户",
value: "1",
},
{
label: "LNG账户",
value: "2",
},
{
label: "尿素账户",
value: "3",
},
{
label: "油批账户",
value: "4",
},
],
auditMarkEnum: [
{
value: null,
label: "",
},
{
label: "未提交",
value: "0",
@ -544,6 +572,10 @@ export default {
},
],
companyNatureTypeEnum: [
{
value: null,
label: "",
},
{
label: "零售客户",
value: "0",
@ -671,6 +703,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;
});

Loading…
Cancel
Save