Commit 593eb4c8 by LJM

报价按钮调整

parent 1bf89216
Showing with 73 additions and 0 deletions
......@@ -60,6 +60,7 @@
<div class="operation-button row verCenter">
<el-button type="primary" @click="exportChange">导出</el-button>
<el-button type="danger" @click="del">删除</el-button>
<el-button type="primary" @click="editInquire">报价</el-button>
</div>
<div class="text-tip row verCenter">
<i class="el-icon-warning"></i>
......@@ -718,6 +719,78 @@ export default {
})
},
/**
* 报价按钮
*/
editInquire() {
if (this.multipleSelection.length != 1) {
this.$message({
showClose: true,
message: '请选择一条询价信息',
type: 'warning'
});
return;
}
if (this.multipleSelection[0].i_status == -1) {
this.$message({
showClose: true,
message: '请勾选待报价和已报价的信息',
type: 'warning'
});
return;
}
this.$http('GET', "/api/inquiry/detail", {
inquiry_item_id: this.multipleSelection[0].id
}).then(res => {
if (res.code === 0) {
if (res.data.quote_list.length > 0) {
var data = res.data.quote_list[0];
this.title = '修改报价';
this.dialogVisible = true;
this.isModify = true; //标记修改状态
this.ruleForm.inquiry_sn = data.inquiry_sn;
this.ruleForm.inquiry_id = data.inquiry_id;
this.ruleForm.inquiry_items_id = data.inquiry_items_id;
this.ruleForm.quote_id = data.id; //编辑的时候需要
this.ruleForm.goods_name = data.goods_name;//赋值型号
this.ruleForm.brand_name = data.brand_name;//赋值品牌
this.ruleForm.quote_number = data.quote_number;//报价数量
data.price_origin = this.float(data.price_origin);//价格转换
this.ruleForm.price_origin = data.price_origin;//价格
this.ruleForm.currency = data.currency.toString();//币种
this.ruleForm.tax_rate = Number(data.tax_rate) * 100 + '%';//税率
this.ruleForm.batch = data.batch;//批次
this.ruleForm.delivery_int = data.delivery_info.delivery_int; //货期
this.ruleForm.delivery_unit_val = data.delivery_info.delivery_unit_val;//货期单位
this.ruleForm.mpq = data.mpq;//最小包装数量
this.ruleForm.moq = data.moq;//起订量
data.price_other = this.float(data.price_other);//其他费用
this.ruleForm.price_other = data.price_other;//其他费用
this.ruleForm.remark = data.remark;//备注
//报价有效期
if (data.expire_time == '') {
const start = new Date();
start.setTime(start.getTime() + 3600 * 1000 * 24 * 2);
this.ruleForm.expire_time = start;
} else {
this.ruleForm.expire_time = data.expire_time;
}
}
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
});
},
/**
*匹配库存选择修改报价 一部分数据是来自当前报价的第一条
*/
editSku(row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment