Browse Source

Merge branch 'master' of http://8.134.10.79:3000/Leadfyy.co/uniapp-supplychain

# Conflicts:
#	canteen/common/api.js
#	supplier/common/api.js
master
Enzo 5 years ago
parent
commit
df5d24fdd9
  1. 1
      canteen/common/api.js
  2. 83
      supplier/pages/offer/index.vue

1
canteen/common/api.js

@ -1,7 +1,6 @@
// appId: 正式 null | 测试 null // appId: 正式 null | 测试 null
export const DEV = "dev"; // dev 测试 | prod 正式 export const DEV = "dev"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号 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://fsc.lanzulive.com'; // 测试服请求地址
export const DEVURL = 'http://192.168.3.133'; // 测试服请求地址 export const DEVURL = 'http://192.168.3.133'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址 export const PRODURL = ''; // 正式服请求地址

83
supplier/pages/offer/index.vue

@ -25,6 +25,22 @@
</view> </view>
</view> </view>
<self-line></self-line> <self-line></self-line>
<!-- 报价时间 -->
<view class="lf-row-between lf-p-30 lf-p-l-32 lf-p-r-32 lf-font-28">
<view class="lf-color-black">报价生效时间</view>
<picker mode="date" :value="deadline_start" @change="pickerChange($event, 'deadline_start')">
<view class="lf-color-555 lf-text-right" style="width: 400rpx;">{{ deadline_start || '请选择...' }}</view>
</picker>
</view>
<view class="lf-row-between lf-p-30 lf-p-l-32 lf-p-r-32 lf-font-28">
<view class="lf-color-black">报价失效时间</view>
<picker mode="date" :value="deadline_end" @change="pickerChange($event, 'deadline_end')">
<view class="lf-color-555 lf-text-right" style="width: 400rpx;">{{ deadline_end || '请选择...' }}</view>
</picker>
</view>
<self-line></self-line>
<!-- 物料table --> <!-- 物料table -->
<view class="box"> <view class="box">
<view class="lf-font-32 lf-color-black lf-font-bold lf-m-b-20">报价明细</view> <view class="lf-font-32 lf-color-black lf-font-bold lf-m-b-20">报价明细</view>
@ -54,6 +70,10 @@
wybTable wybTable
}, },
data(){ data(){
// PS 30
var date1 = new Date();
var date2 = new Date(date1);
date2.setDate(date1.getDate() + 30);
return { return {
headers: [{ headers: [{
label: '物资名称', label: '物资名称',
@ -94,7 +114,9 @@
relation_list: [], // relation_list: [], //
node_top: 0, node_top: 0,
code: '', // code: '', //
type: 0
type: 0,
deadline_start: '',
deadline_end: ''
} }
}, },
computed: { computed: {
@ -175,9 +197,9 @@
this.$http(this.API.API_SUPPLIER_QUOTATIONREUSEBYORDER, { this.$http(this.API.API_SUPPLIER_QUOTATIONREUSEBYORDER, {
q_sn: this.code q_sn: this.code
}).then(res => { }).then(res => {
console.log("materialListByOrder", res);
let list = res.data.order || []; let list = res.data.order || [];
let canteen = res.data.canteen || []; let canteen = res.data.canteen || [];
//
let contents = list.map(item => { let contents = list.map(item => {
let obj = { let obj = {
name: item?.material?.m_name || '', name: item?.material?.m_name || '',
@ -187,10 +209,10 @@
brand: item?.material?.brand || '', brand: item?.material?.brand || '',
quality_level: item?.material?.quality_level || '', quality_level: item?.material?.quality_level || '',
number: item?.material?.m_sn || '', 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: '删除'}, operation: {button: true, key: 'delete', value: '删除'},
unit: item?.material?.unit?.unit_name || '', unit: item?.material?.unit?.unit_name || '',
category: item?.material?.category?.m_cate_name || '' category: item?.material?.category?.m_cate_name || ''
@ -201,6 +223,20 @@
return obj; return obj;
}) })
this.contents = contents; 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); this.getCanteenList(canteen);
}) })
}, },
@ -212,6 +248,7 @@
console.log("materialListByBatch", res); console.log("materialListByBatch", res);
let list = res.data.order || []; let list = res.data.order || [];
let canteen = res.data.canteen || []; let canteen = res.data.canteen || [];
//
let contents = list.map(item => { let contents = list.map(item => {
return { return {
name: item?.material?.m_name || '', name: item?.material?.m_name || '',
@ -227,6 +264,20 @@
} }
}) })
this.contents = contents; 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); this.getCanteenList(canteen);
}) })
}, },
@ -267,6 +318,10 @@
}) })
} }
}, },
//
pickerChange(event, current_name){
this[current_name] = event.detail.value;
},
// modal // modal
switchRelation(){ switchRelation(){
if(this.type == 1) return this.$msg('编辑不可更换关联食堂哦'); if(this.type == 1) return this.$msg('编辑不可更换关联食堂哦');
@ -293,7 +348,9 @@
this.$http(this.API.API_SUPPLIER_QUOTATIONSAVE, { this.$http(this.API.API_SUPPLIER_QUOTATIONSAVE, {
data: list, data: list,
state: state, state: state,
q_sn: this.code
q_sn: this.code,
start: this.deadline_start,
end: this.deadline_end
}).then(res => { }).then(res => {
this.$msg('操作成功').then(result => { this.$msg('操作成功').then(result => {
this.$toBack(); this.$toBack();
@ -330,15 +387,23 @@
if(canteen_ids.length <= 0){ if(canteen_ids.length <= 0){
return this.$msg('您未选择关联食堂哦') return this.$msg('您未选择关联食堂哦')
} }
if(!this.deadline_start){
return this.$msg('您未选择报价生效时间哦')
}
if(!this.deadline_end){
return this.$msg('您未选择报价失效时间哦')
}
if(list.length <= 0){ if(list.length <= 0){
return this.$msg('没有需要报价的物资')
return this.$msg('请补充完整物资报价信息')
} }
// //
let state = ['待发起', '待审核'][_t]; let state = ['待发起', '待审核'][_t];
this.$http(this.API.API_SUPPLIER_QUOTATIONAPPLY, { this.$http(this.API.API_SUPPLIER_QUOTATIONAPPLY, {
data: list, data: list,
state: state, state: state,
canteen_ids: canteen_ids
canteen_ids: canteen_ids,
start: this.deadline_start,
end: this.deadline_end
}).then(res => { }).then(res => {
this.$msg(res.data).then(result => { this.$msg(res.data).then(result => {
this.$toBack(); this.$toBack();

Loading…
Cancel
Save