Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
037bda3b5f
|
|
@ -313,5 +313,39 @@ export default {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
quotation: {
|
||||||
|
list: {
|
||||||
|
name: "报价单列表",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/pum/quotation/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
req: async function(id){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/pum/quotation/${id}/`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "新增",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/pum/quotation/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/pum/quotation/${id}/`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="totalNumContnier">
|
<div class="totalNumContnier">
|
||||||
<div class="totalNumWrap totalNum_orange">
|
<div class="totalNumWrap totalNum_orange">
|
||||||
<img class="" src="img/number_bg_orange.png" />
|
<img class="" src="img/number_bg_orange.png" />
|
||||||
<span class="totalNumText">本月石灰产量</span>
|
<span class="totalNumText">本月氧化钙产量</span>
|
||||||
<div class="totalNumber">
|
<div class="totalNumber">
|
||||||
{{ totalData.shuliao }}
|
{{ totalData.shuliao }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -207,12 +207,12 @@
|
||||||
<div class="flexItem">
|
<div class="flexItem">
|
||||||
<div class="itemTitle">
|
<div class="itemTitle">
|
||||||
<div class="itemTitleIcon"></div>
|
<div class="itemTitleIcon"></div>
|
||||||
<div>能源数据</div>
|
<div>本月能源单耗</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemBody" style="padding: 5%">
|
<div class="itemBody" style="padding: 5%">
|
||||||
<div class="elecItem">
|
<div class="elecItem">
|
||||||
<div class="elecItem_wrap">
|
<div class="elecItem_wrap">
|
||||||
<span>本月氧化钙综合电耗</span>
|
<span>氧化钙综合电耗</span>
|
||||||
<p class="elec_number">
|
<p class="elec_number">
|
||||||
{{ (Number(hotData.celec_consume_unit)+Number(dicData.elec_month)).toFixed(2) }}
|
{{ (Number(hotData.celec_consume_unit)+Number(dicData.elec_month)).toFixed(2) }}
|
||||||
<span class="elec_unit">kW·h</span>
|
<span class="elec_unit">kW·h</span>
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="elecItem">
|
<div class="elecItem">
|
||||||
<div class="elecItem_wrap">
|
<div class="elecItem_wrap">
|
||||||
<span>本月氧化钙综合煤耗</span>
|
<span>氧化钙综合煤耗</span>
|
||||||
<p class="elec_number">
|
<p class="elec_number">
|
||||||
{{ (Number(hotData.coal_consume_unit)*1000+Number(dicData.elec_year)*1000).toFixed(2) }}
|
{{ (Number(hotData.coal_consume_unit)*1000+Number(dicData.elec_year)*1000).toFixed(2) }}
|
||||||
<span class="elec_unit">kgce/t</span>
|
<span class="elec_unit">kgce/t</span>
|
||||||
|
|
@ -230,7 +230,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="elecItem">
|
<div class="elecItem">
|
||||||
<div class="elecItem_wrap">
|
<div class="elecItem_wrap">
|
||||||
<span>本月氧化钙综合能耗</span>
|
<span>氧化钙综合能耗</span>
|
||||||
<p class="elec_number">
|
<p class="elec_number">
|
||||||
{{ (Number(hotData.cen_consume_unit)).toFixed(2)}}
|
{{ (Number(hotData.cen_consume_unit)).toFixed(2)}}
|
||||||
<span class="elec_unit">kgce/t</span>
|
<span class="elec_unit">kgce/t</span>
|
||||||
|
|
@ -1122,16 +1122,17 @@ export default {
|
||||||
that.hotData.cen_consume_unit = Number(ress[0].cen_consume_unit).toFixed(2);
|
that.hotData.cen_consume_unit = Number(ress[0].cen_consume_unit).toFixed(2);
|
||||||
that.hotData.celec_consume_unit =Number(ress[0].celec_consume_unit).toFixed(2);
|
that.hotData.celec_consume_unit =Number(ress[0].celec_consume_unit).toFixed(2);
|
||||||
params.mpoint = mpoint
|
params.mpoint = mpoint
|
||||||
total_production = ress[0].total_production;
|
total_production = ress[0].total_production; // 出窑的产量(氧化钙)
|
||||||
return that.$API.enm.mpointstat.list.req(params);
|
return that.$API.enm.mpointstat.list.req(params);
|
||||||
// that.hotData.coal_consume_unit =Number(ress[0].coal_consume_unit).toFixed(2);
|
// that.hotData.coal_consume_unit =Number(ress[0].coal_consume_unit).toFixed(2);
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if( res.length>0 ){
|
if( res.length>0 ){
|
||||||
let ratio = (Number(res[0].val)/Number(total_production));
|
//
|
||||||
|
let ratio = (Number(res[0].val)/Number(total_production)); //煤粉消耗量/出窑的产量(氧化钙)
|
||||||
if (ratio > 0.135){
|
if (ratio > 0.135){
|
||||||
that.hotData.coal_consume_unit = 0.130;
|
that.hotData.coal_consume_unit = 0.130;
|
||||||
}else{
|
}else{
|
||||||
that.hotData.coal_consume_unit = Number(ratio[0].val)/Number(total_production).toFixed(2);
|
that.hotData.coal_consume_unit = ratio; //煤粉消耗量/出窑的产量(氧化钙)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="API.pum.quotation.list"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:query="query"
|
||||||
|
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
|
||||||
|
>
|
||||||
|
<el-table-column label="客户名称" prop="customer_name" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="审批状态" width="200" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||||
|
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>`
|
||||||
|
<el-table-column label="产品名称" prop="product_name" width="100" show-overflow-tooltip></el-table-column>`
|
||||||
|
<el-table-column label="联系人" prop="contact_person" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="联系电话" prop="contact_phone" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="收件地址" prop="receive_address" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品规格/数量" prop="product_spec_quantity" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="报价依据" prop="receive_address" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="建议价格及计算方式" prop="product_spec_quantity" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="报价区间" prop="receive_address" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="报价人" prop="product_spec_quantity" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="申请日期" prop="apply_date" width="100" show-overflow-tooltip></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<el-drawer title="报价审核" v-model="drawerVisible" :size="'80%'" destroy-on-close>
|
||||||
|
<quotation_form :mode="mode" :t_id="t_id"></quotation_form>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import API from '@/api'
|
||||||
|
import quotation_form from './quotation_form.vue'
|
||||||
|
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||||
|
const query = ref({});
|
||||||
|
const drawerVisible = ref(false);
|
||||||
|
const mode = ref('add');
|
||||||
|
const t_id = ref(null);
|
||||||
|
const handleAdd = () => {
|
||||||
|
mode.value = 'add';
|
||||||
|
drawerVisible.value = true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<el-form label-width="150px" :model="formData" style="padding: 20px;">
|
||||||
|
<el-form-item label="客户名称" required>
|
||||||
|
<el-input v-model="formData.customer_name" placeholder="请输入客户名称" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品名称" required>
|
||||||
|
<el-input v-model="formData.product_name" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系人" required>
|
||||||
|
<el-input v-model="formData.contact_person" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话" required>
|
||||||
|
<el-input v-model="formData.contact_phone" type="number" min="0" clearable :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="收件地址" required>
|
||||||
|
<el-input v-model="formData.receive_address" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品规格/数量" required>
|
||||||
|
<el-input v-model="formData.product_spec_quantity" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报价依据" required>
|
||||||
|
<el-input v-model="formData.quotation_basis" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="建议价格及计算方式" required>
|
||||||
|
<el-input v-model="formData.suggested_price_calc" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报价区间" required>
|
||||||
|
<el-input v-model="formData.quotation_range" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报价人" required>
|
||||||
|
<el-input v-model="formData.quoter" :readonly="localMode === 'show'"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请日期" required>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.apply_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期时间"
|
||||||
|
align="right"
|
||||||
|
value-format="YYYY-MM-DD">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-footer>
|
||||||
|
<el-button type="danger"
|
||||||
|
v-if="localMode=='edit'"
|
||||||
|
:loading="saveLoading"
|
||||||
|
style="margin-right: 4px;"
|
||||||
|
@click="handleDel"
|
||||||
|
>删除</el-button>
|
||||||
|
<ticketd_b
|
||||||
|
v-if ="formData.ticket_"
|
||||||
|
:t_id="formData.id"
|
||||||
|
:ticket_="formData.ticket_"
|
||||||
|
@success="$emit('success', localMode)"
|
||||||
|
ref="ticketd_b"
|
||||||
|
></ticketd_b>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
style="margin-right: 4px;"
|
||||||
|
@click="handleSave"
|
||||||
|
v-auth="'supplieraudit.delete'"
|
||||||
|
:loading="saveLoading"
|
||||||
|
>提交审批</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-main>
|
||||||
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
<ticketd :ticket_="formData.ticket_" @success="$emit('success')"></ticketd>
|
||||||
|
</el-aside>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||||
|
import ticketd from '@/views/wf/ticketd.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
ticketd_b,
|
||||||
|
ticketd
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: 'show'
|
||||||
|
},
|
||||||
|
t_id: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
},
|
||||||
|
localMode: this.mode,
|
||||||
|
saveLoading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
mode(newVal) {
|
||||||
|
this.localMode = newVal;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.t_id) {
|
||||||
|
this.getTid();
|
||||||
|
} else {
|
||||||
|
this.localMode = "add";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getTid() {
|
||||||
|
let res = await this.$API.pum.quotation.item.req(this.t_id);
|
||||||
|
this.formData = res;
|
||||||
|
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
|
||||||
|
this.localMode = "edit";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDel() {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(()=>{
|
||||||
|
this.$API.pum.quotation.delete.req(this.formData.id).then(res=>{
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.$emit('success');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
if (this.localMode == "add") {
|
||||||
|
this.saveLoading = true;
|
||||||
|
this.$API.pum.quotation.create.req(this.formData).then(res=>{
|
||||||
|
this.saveLoading = true;
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.$emit('success', this.localMode);
|
||||||
|
}).catch(e=>{
|
||||||
|
this.saveLoading = false;
|
||||||
|
})
|
||||||
|
} else if (this.localMode == "edit") {
|
||||||
|
this.$message.error("不支持编辑!")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue