Browse Source

订单状态 出库详情(待优化)等等

master
Enzo 5 years ago
parent
commit
d62e08bce4
  1. 7
      canteen/common/api.js
  2. 131
      canteen/pages/delivery/detail.vue
  3. 18
      canteen/pages/delivery/order.vue
  4. 1
      canteen/pages/purchase/detail.vue
  5. 26
      canteen/pages/purchase/order.vue
  6. 2
      supplier/common/api.js
  7. 2
      supplier/pages/gonghuo/order.vue
  8. 2
      supplier/pages/order/index.vue

7
canteen/common/api.js

@ -2,8 +2,8 @@
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.96'; // 测试服请求地址
export const DEVURL = 'http://fsc.lanzulive.com'; // 测试服请求地址
// export const DEVURL = 'http://192.168.43.78'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址
export const API_CANTEEN_LOGIN = '/api/canteen/login'; // 登录
@ -14,6 +14,9 @@ export const API_CANTEEN_PURCHASEORDERLIST = '/api/canteen/purchaseOrderList'; /
export const API_CANTEEN_WAREHOUSEOUT = '/api/canteen/warehouseOut'; // 出库申请
export const API_CANTEEN_WAREHOUSEOUTLIST = '/api/canteen/warehouseOutList'; // 出库申请列表
export const API_CANTEEN_PURCHASEDETAIL = '/api/canteen/purchaseDetail'; // 采购单详情
export const API_CANTEEN_OUTDETAIL = '/api/canteen/warehouseOutDetail'; // 出库单详情
export const API_CANTEEN_SUPPLIERLIST = '/api/canteen/supplierList'; // 供应商列表
export const API_CANTEEN_MATERIALLISTBYWAREHOUSE = '/api/canteen/materialListByWarehouse'; // 仓库物资列表
export const API_CANTEEN_PURCHASEUPDATE = '/api/canteen/purchaseUpdate'; // 改变采购单状态

131
canteen/pages/delivery/detail.vue

@ -26,9 +26,24 @@
</view>
<view style="height: 100rpx;"></view>
<!-- 操作按钮 -->
<view class="fixed-bottom">
<button class="btn btn2">立即申请</button>
</view>
<!-- <view class="fixed-bottom" v-if="type != '备货中'">
<view v-if="type == '待发单'" class="lf-row-flex-end">
<button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=1')">编辑</button>
<button class="btn btn2">立即发单</button>
</view>
<view v-else-if="type == '待接单'" class="lf-row-flex-end">
<button class="btn btn2" style="background-color: #FF0000;" @click="orderStateChange('已撤销')">撤销订单</button>
</view>
<view v-else-if="type == '已发货'" class="lf-row-flex-end">
<button class="btn btn1">退单</button>
<button class="btn btn1 lf-m-l-20" @click="is_show_voucher = true">上传凭证</button>
<button class="btn btn2" @click="$url('/pages/purchase/receipt?o_sn='+ order.o_sn)">确认收货</button>
</view>
<view v-else-if="type == '已收货' || type == '已入库'" class="lf-row-between">
<button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=2')">复用采购单</button>
<view class="lf-font-32" style="color: #11D189;">已完成</view>
</view>
</view> -->
</view>
</template>
@ -40,66 +55,66 @@
components: { lfYsteps, wybTable },
data(){
return {
stepList: [
{
time: '2021-07-23 13:23:52', // --
info: '订单创建', // --
isFinished: false, // index --
isActive: true, // Active 使 index --
isShowSlot: false // Slot --
}
],
stepList: [],
headers: [{
key: 'name',
label: '姓名'
},{
key: 'age',
label: '年龄'
},{
key: 'sex',
label: '性别'
},{
key: 'height',
label: '身高'
},{
key: 'info',
label: '描述'
},{
key: 'operation',
label: '操作'
}],
contents: [{
name: '张三',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是',
operation: {button: true, key: 'delete', value: '删除'}
}, {
name: '李四',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
}, {
name: '赵五',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
},{
name: '王六',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
}]
label: '物资名称',
key: 'material_name'
},{
label: '规格',
key: 'spec_name'
},{
key: 'brand',
label: '品牌'
},{
key: 'quality_level',
label: '品级'
},{
label: '编号',
key: 'm_sn'
},{
label: '供应商',
key: 'supplier_name'
},{
label: '批次',
key: 'purchase_id'
},{
key: 'delivery_number',
label: '出库数量'
}],
contents: [],
o_sn: '',
order: {},
type: 4,
}
},
onLoad(){
onLoad(options){
this.o_sn = options.id || '';
this.getData();
},
methods: {
getData(){
this.$http(this.API.API_CANTEEN_OUTDETAIL, {
o_sn: this.o_sn
// o_sn: '802316269455228606'
}).then(res => {
console.log("xxx",res)
this.order = res.data
let list = res.data || [];
let contents = list.map(item => {
return {
material_name: item.material.m_name,
spec: item.spec.name,
pre_tax_price: item.total_tax_amount,
after_tax_price: item.total_non_tax_amount,
spec_id: item.spec.id,
material_id: item.material.id
}
})
this.contents = contents;
console.log(this.contents)
this.type = res.data.material.state
})
},
onButtonClick(event){
uni.showModal({
title: '温馨提示',

18
canteen/pages/delivery/order.vue

@ -12,7 +12,7 @@
@scrolltolower="scrolltolower"
:refresher-triggered="tabItem.isRefresher"
@refresherrefresh="onRefresherrefresh">
<view class="card" v-for="(item, index) in tabItem.list" :key="item.id" @click="$url('/pages/delivery/detail?id='+ item.id)">
<view class="card" v-for="(item, index) in tabItem.list" :key="item.id" @click="$url('/pages/delivery/detail?id='+ item.o_sn)">
<view class="lf-row-between item">
<view class="lf-color-gray">申请人</view>
<view class="lf-color-black">{{ item.o_name }}</view>
@ -92,18 +92,18 @@
methods: {
// TODO
getData(options){
if(this.current == 1) {
this.stateText = '待确认'
}else if(this.current == 2) {
this.stateText = '已出库'
}else {
this.stateText = ''
}
// if(this.current == 1) {
// this.stateText = ''
// }else if(this.current == 2) {
// this.stateText = ''
// }else {
// this.stateText = ''
// }
let item = this.tab_list[this.current];
this.$http(this.API.API_CANTEEN_WAREHOUSEOUTLIST,{
page: item.page,
pagesize: 10,
state: this.stateText
state: this.current
}).then(res => {
console.log("getData", res);
this.tab_list[this.current].list = res.data.list || [];

1
canteen/pages/purchase/detail.vue

@ -226,6 +226,7 @@
}
})
this.contents = contents;
console.log(this.contents)
this.type = res.data.order.state
})
},

26
canteen/pages/purchase/order.vue

@ -114,22 +114,22 @@
//
getData(options){
let item = this.tab_list[this.current];
let tabType = 0
if(this.current == 2) {
tabType = 3
}else if(this.current == 3){
tabType = 4
}else if(this.current == 4){
tabType = 5
}else if(this.current == 5){
tabType = 7
}else {
tabType = this.current
}
// let tabType = 0
// if(this.current == 2) {
// tabType = 3
// }else if(this.current == 3){
// tabType = 4
// }else if(this.current == 4){
// tabType = 5
// }else if(this.current == 5){
// tabType = 7
// }else {
// tabType = this.current
// }
this.$http(this.API.API_CANTEEN_PURCHASEORDERLIST, {
page: item.page,
page_size: this.page_size,
state: tabType || ''
state: this.current || ''
}).then(res => {
console.log("getData", res);
let list = res.data.list || {};

2
supplier/common/api.js

@ -2,7 +2,7 @@
export const DEV = "dev"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
// export const DEVURL = 'http://192.168.3.78'; // 测试服请求地址
export const DEVURL = 'http://192.168.3.5'; // 测试服请求地址
export const DEVURL = 'http://fsc.lanzulive.com'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址
export const API_SUPPLIER_INDEX = '/api/supplier/index'; // 落地页

2
supplier/pages/gonghuo/order.vue

@ -90,7 +90,7 @@
let item = this.tab_list[this.current];
let state = item.name == '全部' ? '' : item.name;
this.$http(this.API.API_SUPPLIER_PURCHASEORDERLIST, {
state: state,
state: this.current,
page: item.page,
page_size: this.page_size
}).then(res => {

2
supplier/pages/order/index.vue

@ -85,7 +85,7 @@
getData(options){
let item = this.tab_list[this.current];
this.$http(this.API.API_SUPPLIER_QUOTATIONORDERLIST, {
state: item.state_name,
state: this.current,
page: item.page,
page_size: this.page_size
}).then(res => {

Loading…
Cancel
Save