This commit is contained in:
lixuan
2023-02-27 09:20:14 +08:00
parent 920a9c3d28
commit cba8576e30
4 changed files with 37 additions and 11 deletions

View File

@@ -368,7 +368,7 @@ export default {
this.$emit("closeWindow");
this.form = {};
this.$refs.form.clearValidate();
this.controlWindows.create = false;
this.controlWindows.bill = false;
},
},
};

View File

@@ -106,7 +106,7 @@
minWidth="180"
>
<template slot-scope="{ row }">
<span>{{ row.actQuantity?row.actQuantity:'--' }} / {{ row.preQuantity?row.preQuantity:'--' }} </span>
<span>{{ row.actQuantity|toNumberFixed }} / {{ row.preQuantity|toNumberFixed }} {{row.productMeasurement}}</span>
</template>
</el-table-column>
@@ -116,7 +116,7 @@
minWidth="180"
>
<template slot-scope="{ row }">
<span>{{ row.actAmount?row.actAmount:'--' }} / {{ row.preAmount?row.preAmount:'--' }} </span>
<span>{{ row.actAmount|toNumberFixed}} / {{ row.preAmount|toNumberFixed }} </span>
</template>
</el-table-column>
<el-table-column label="时间" minWidth="235">
@@ -204,6 +204,13 @@ import autocomplete from "components/autocomplete/index.vue";
import billOfLading from "./components/billOfLading.vue";
export default {
filters:{
toNumberFixed(val){
if(val){
return Number(val).toFixed(2)
}else{return '--'}
}
},
data() {
return {
controlWindows: {

View File

@@ -37,6 +37,7 @@
<autocomplete :params="form" :config="configAutocomplete" />
</el-form-item>
<el-form-item label="产品类型" prop="productType">
<!-- <autocomplete :params="form" :config="configAutocompleteCp" /> -->
<el-select v-model="form.productType" @change="productChange" placeholder="请选择产品类型">
<el-option
v-for="(item, index) in productTypeList"
@@ -47,7 +48,7 @@
</el-select>
</el-form-item>
<el-form-item label="产品名称" prop="productId">
<el-select v-model="form.productId" @change="productDataList" placeholder="请选择产品类型">
<el-select :disabled="rowCreate" v-model="form.productId" @change="productDataList" placeholder="请选择产品类型">
<el-option
v-for="(item, index) in productNameList"
:key="index"
@@ -147,6 +148,7 @@ export default {
echoId: "",
echoName: "",
},
rowCreate:false,
productTypeList: [
{
label: "0#柴",
@@ -186,6 +188,7 @@ export default {
},
methods: {
productDataList(e){
console.log(e,'ppppppppppppppp')
this.productRowData = this.productNameList.filter(
(item) => item.id == e
);
@@ -206,16 +209,17 @@ export default {
}
},
//搜索产品
productData(){
async productData(){
let data = {
refineryId:this.form.refineryId,
productType:this.form.productType,
enableMark:'ENABLE'
}
serve.getRefineryProductList(data).then((res) => {
await serve.getRefineryProductList(data).then((res) => {
this.productNameList = res.data;
})
console.log(this.productRowData,'aaaaaaaaaa')
// this.form.productId = this.productNameList[0].productId
console.log(this.productRowData,this.productNameList,'aaaaaaaaaa')
},
//搜索客户
customData(value){
@@ -234,9 +238,14 @@ export default {
this.configAutocomplete.echoId = id;
this.configAutocomplete.echoName = this.form.refineryName;
this.form.salePrice = this.form.salePrice2company
this.form.productId = this.form.id
delete this.form.id
this.rowCreate = true
this.productChange()
console.log("this.form", this.form);
}else{
this.rowCreate = false
}
},
submit() {
@@ -261,7 +270,10 @@ export default {
closeWindow() {
this.$emit("closeWindow");
this.form = {};
this.customList = []
this.controlWindows.addInfo = {};
this.configAutocomplete = {}
this.productNameList = []
this.$refs.form.clearValidate();
this.controlWindows.create = false;
},

View File

@@ -99,17 +99,17 @@
</el-table-column>
<el-table-column prop="refineryLevel" label="成本价" width="70">
<template slot-scope="{ row }">
{{ row.floorPrice }}/{{ row.measurement }}
{{ row.floorPrice|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
</template>
</el-table-column>
<el-table-column prop="refineryLevel" label="企业销售价" width="100">
<template slot-scope="{ row }">
{{ row.salePrice2company }}/{{ row.measurement }}
{{ row.salePrice2company|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
</template>
</el-table-column>
<el-table-column prop="refineryLevel" label="个人销售价" width="100">
<template slot-scope="{ row }">
{{ row.salePrice2personal }}/{{ row.measurement }}
{{ row.salePrice2personal|toNumberFixed }}/{{ row.measurement|toNumberFixed }}
</template>
</el-table-column>
<el-table-column label="时间" width="235">
@@ -142,7 +142,7 @@
<el-dropdown-item command="record">调价记录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span 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,6 +232,13 @@ export default {
autocomplete,
generalDetails,
},
filters:{
toNumberFixed(val){
if(val){
return Number(val).toFixed(2)
}else{return '暂无'}
}
},
data() {
return {
controlWindows: {