xiaozy_产品列表
xiaozhiyong 2 years ago
parent 0b9076df67
commit 56cf799cfb
  1. 3
      src/components/autocomplete/index.vue
  2. 3
      src/views/customerManagement/companyManagement/index.vue
  3. 7
      src/views/product/components/add.vue
  4. 18
      src/views/product/components/adjust.vue
  5. 4
      src/views/product/components/record.vue
  6. 6
      src/views/product/index.vue
  7. 7
      src/views/refineryAccount/components/add.vue

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

@ -501,7 +501,8 @@ export default {
querykey: "companyName",
},
configAutocompleteHead: {
serveTarget: commonServe.getCompanyNames,
serveTarget: commonServe.getRefineryCompanyList,
autocompleteKey: "name",
labelKey: "name",
valueKey: "name",
placeholder: "总公司名称",

@ -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,17 +97,17 @@
</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 }}
</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 }}
</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 }}
</template>

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