diff --git a/canteen/common/api.js b/canteen/common/api.js
index f45c0f1..2c4b17f 100644
--- a/canteen/common/api.js
+++ b/canteen/common/api.js
@@ -1,7 +1,6 @@
// appId: 正式 null | 测试 null
export const DEV = "dev"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
-// export const DEVURL = 'http://192.168.3.78'; // 测试服请求地址
// export const DEVURL = 'http://fsc.lanzulive.com'; // 测试服请求地址
export const DEVURL = 'http://192.168.3.133'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址
diff --git a/supplier/pages/offer/index.vue b/supplier/pages/offer/index.vue
index 417261f..d5bc772 100644
--- a/supplier/pages/offer/index.vue
+++ b/supplier/pages/offer/index.vue
@@ -25,6 +25,22 @@
+
+
+ 报价生效时间
+
+ {{ deadline_start || '请选择...' }}
+
+
+
+ 报价失效时间
+
+ {{ deadline_end || '请选择...' }}
+
+
+
+
+
报价明细
@@ -54,6 +70,10 @@
wybTable
},
data(){
+ // PS 获取30天后日期
+ var date1 = new Date();
+ var date2 = new Date(date1);
+ date2.setDate(date1.getDate() + 30);
return {
headers: [{
label: '物资名称',
@@ -94,7 +114,9 @@
relation_list: [], // 关联食堂列表
node_top: 0,
code: '', // 订单号,批次号,如果有
- type: 0
+ type: 0,
+ deadline_start: '',
+ deadline_end: ''
}
},
computed: {
@@ -175,9 +197,9 @@
this.$http(this.API.API_SUPPLIER_QUOTATIONREUSEBYORDER, {
q_sn: this.code
}).then(res => {
- console.log("materialListByOrder", res);
let list = res.data.order || [];
let canteen = res.data.canteen || [];
+ // 处理表格显示
let contents = list.map(item => {
let obj = {
name: item?.material?.m_name || '',
@@ -187,10 +209,10 @@
brand: item?.material?.brand || '',
quality_level: item?.material?.quality_level || '',
number: item?.material?.m_sn || '',
- purchase_limit: {edit: true, value: item?.quotation?.purchase_limit || ''},
- tax_price: {edit: true, value: item?.quotation?.tax_price || ''},
- non_tax_price: {edit: true, value: item?.quotation?.non_tax_price || ''},
- quotation_id: item?.quotation?.id || 0,
+ purchase_limit: {edit: true, value: item?.quotation_item?.purchase_limit || ''},
+ tax_price: {edit: true, value: item?.quotation_item?.tax_price || ''},
+ non_tax_price: {edit: true, value: item?.quotation_item?.non_tax_price || ''},
+ quotation_id: item?.quotation_item?.id || 0,
operation: {button: true, key: 'delete', value: '删除'},
unit: item?.material?.unit?.unit_name || '',
category: item?.material?.category?.m_cate_name || ''
@@ -201,6 +223,20 @@
return obj;
})
this.contents = contents;
+ // 处理报价生效、失效时间
+ let deadline_start = '';
+ let deadline_end = '';
+ if(list[0] && list[0]?.quotation_item?.quotation){
+ let quotation = list[0]?.quotation_item?.quotation || {};
+ if(quotation.deadline_start){
+ deadline_start = quotation.deadline_start.split(' ')[0];
+ }
+ if(quotation.deadline){
+ deadline_end = quotation.deadline.split(' ')[0];
+ }
+ }
+ this.deadline_start = deadline_start;
+ this.deadline_end = deadline_end;
this.getCanteenList(canteen);
})
},
@@ -212,6 +248,7 @@
console.log("materialListByBatch", res);
let list = res.data.order || [];
let canteen = res.data.canteen || [];
+ // 处理表格显示
let contents = list.map(item => {
return {
name: item?.material?.m_name || '',
@@ -227,6 +264,20 @@
}
})
this.contents = contents;
+ // 处理报价生效、失效时间
+ let deadline_start = '';
+ let deadline_end = '';
+ if(list[0] && list[0]?.quotation_item?.quotation){
+ let quotation = list[0]?.quotation_item?.quotation || {};
+ if(quotation.deadline_start){
+ deadline_start = quotation.deadline_start.split(' ')[0];
+ }
+ if(quotation.deadline){
+ deadline_end = quotation.deadline.split(' ')[0];
+ }
+ }
+ this.deadline_start = deadline_start;
+ this.deadline_end = deadline_end;
this.getCanteenList(canteen);
})
},
@@ -267,6 +318,10 @@
})
}
},
+ // 日期选择器值被改变
+ pickerChange(event, current_name){
+ this[current_name] = event.detail.value;
+ },
// 切换显示关联食堂modal
switchRelation(){
if(this.type == 1) return this.$msg('编辑不可更换关联食堂哦');
@@ -293,7 +348,9 @@
this.$http(this.API.API_SUPPLIER_QUOTATIONSAVE, {
data: list,
state: state,
- q_sn: this.code
+ q_sn: this.code,
+ start: this.deadline_start,
+ end: this.deadline_end
}).then(res => {
this.$msg('操作成功').then(result => {
this.$toBack();
@@ -330,15 +387,23 @@
if(canteen_ids.length <= 0){
return this.$msg('您未选择关联食堂哦')
}
+ if(!this.deadline_start){
+ return this.$msg('您未选择报价生效时间哦')
+ }
+ if(!this.deadline_end){
+ return this.$msg('您未选择报价失效时间哦')
+ }
if(list.length <= 0){
- return this.$msg('没有需要报价的物资')
+ return this.$msg('请补充完整物资报价信息')
}
// 操作状态,是保存还是直接发起
let state = ['待发起', '待审核'][_t];
this.$http(this.API.API_SUPPLIER_QUOTATIONAPPLY, {
data: list,
state: state,
- canteen_ids: canteen_ids
+ canteen_ids: canteen_ids,
+ start: this.deadline_start,
+ end: this.deadline_end
}).then(res => {
this.$msg(res.data).then(result => {
this.$toBack();