Authored by 李奇

发货修改

@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 }, 26 },
27 methods: { 27 methods: {
28 confirm(){ 28 confirm(){
  29 + this.$em
29 this.$Message.error('上传缺货') 30 this.$Message.error('上传缺货')
30 }, 31 },
31 change(val){ 32 change(val){
  1 +<template>
  2 + <Modal
  3 + v-model="showModal"
  4 + @on-ok="ok"
  5 + @on-cancel="cancel"
  6 + width="auto"
  7 + class-name="deliver-modal"
  8 + cancel-text="取消"
  9 + ok-text="提交">
  10 + <div class="deliver-modal">
  11 + <div class="deliver-info">
  12 + <Row class-name="info-row">
  13 + <Col span="4" class-name="info-col">收货仓库:</Col>
  14 + <Col span="20">{{houseInfo.storehouseName}}</Col>
  15 + </Row>
  16 + <Row class-name="info-row">
  17 + <Col span="4">物流公司:</Col>
  18 + <Col span="20">
  19 + <Select v-model="houseId">
  20 + <Option v-for="item in houseList"
  21 + :value="item.value"
  22 + :key="item">
  23 + {{ item.label }}
  24 + </Option>
  25 + </Select>
  26 + </Col>
  27 + </Row>
  28 + <Row>
  29 + <Col span="4">物流单号:</Col>
  30 + <Col span="20"><Input></Input></Col>
  31 + </Row>
  32 + <p class="info-tip">
  33 + 发往:{{houseInfo.storehouseName}}{{houseInfo.address}}{{houseInfo.adminName}}
  34 + </p>
  35 + </div>
  36 + <!--<Spin v-if="showLoading" fix size="large"></Spin>-->
  37 + </div>
  38 + </Modal>
  39 +</template>
  40 +
  41 +<script>
  42 +import _ from 'lodash';
  43 +import service from 'trade-service';
  44 +
  45 +export default {
  46 + name: 'OutStock',
  47 + props: {
  48 + },
  49 + data() {
  50 + return {
  51 + showModal: false,
  52 + showLoading: true,
  53 + houseInfo: {},
  54 + houseId: 0,
  55 + houseList: [
  56 + {
  57 + label: 'EMS',
  58 + value: '0'
  59 +
  60 + }
  61 + ]
  62 + };
  63 + },
  64 + watch: {
  65 + },
  66 + methods: {
  67 + show() {
  68 + this.showModal = true;
  69 + service.allotWarehouseInfo()
  70 + .then(res => {
  71 + // todo
  72 +
  73 + this.houseInfo = {
  74 + adminName: '许凯',
  75 + address: '南京市玄武区1号',
  76 + phone: 13901065166,
  77 + storehouseName: '南京1号仓库',
  78 + id: 3,
  79 + status: 1
  80 + }
  81 + });
  82 + },
  83 + ok(){
  84 +
  85 + },
  86 + cancel(){
  87 + this.$Message.info('click cancel')
  88 +
  89 + }
  90 + }
  91 +};
  92 +</script>
  93 +
  94 +<style lang="scss">
  95 +
  96 + .deliver-modal {
  97 + padding: 30px;
  98 +
  99 + .info-row {
  100 + margin-bottom: 20px;
  101 + }
  102 +
  103 + .info-tip {
  104 + margin-top: 20px;
  105 + color: #ff0000;
  106 + text-align: center;
  107 + }
  108 +
  109 + .ivu-modal {
  110 + width: 50%;
  111 + }
  112 + }
  113 +
  114 +
  115 +</style>
1 import SizeEdit from './size-edit'; 1 import SizeEdit from './size-edit';
2 -import UploadStockOut from './size-edit'; 2 +import UploadStockOut from './upload-stock-out';
  3 +import DeliverProduct from './deliver-product';
3 4
4 export { 5 export {
5 SizeEdit, 6 SizeEdit,
6 - UploadStockOut 7 + UploadStockOut,
  8 + DeliverProduct
7 }; 9 };
@@ -56,12 +56,11 @@ export default { @@ -56,12 +56,11 @@ export default {
56 watch: { 56 watch: {
57 }, 57 },
58 methods: { 58 methods: {
  59 + show() {
  60 + this.showModal = true;
  61 + },
59 ok(){ 62 ok(){
60 63
61 - // todo  
62 -  
63 -  
64 -  
65 }, 64 },
66 cancel(){ 65 cancel(){
67 this.$Message.info('click cancel') 66 this.$Message.info('click cancel')
@@ -52,8 +52,7 @@ @@ -52,8 +52,7 @@
52 import moment from 'moment'; 52 import moment from 'moment';
53 import service from 'trade-service'; 53 import service from 'trade-service';
54 import Store from '../store/done'; 54 import Store from '../store/done';
55 - import { OutStock } from 'components/modal'  
56 - import { CellPrdInfo, CellDispatch, CellDeliver, CellStockOut } from 'components/cell'; 55 + import { CellPrdInfo, CellDispatch } from 'components/cell';
57 56
58 export default { 57 export default {
59 name: 'TabDone', 58 name: 'TabDone',
@@ -193,10 +192,7 @@ @@ -193,10 +192,7 @@
193 }, 192 },
194 components: { 193 components: {
195 CellPrdInfo, 194 CellPrdInfo,
196 - CellDispatch,  
197 - CellDeliver,  
198 - CellStockOut,  
199 - OutStock 195 + CellDispatch
200 } 196 }
201 }; 197 };
202 </script> 198 </script>
@@ -45,7 +45,8 @@ @@ -45,7 +45,8 @@
45 @on-change="pageChange" :page-size="20" show-total></Page> 45 @on-change="pageChange" :page-size="20" show-total></Page>
46 </LayoutList> 46 </LayoutList>
47 47
48 - <UploadStockOut></UploadStockOut> 48 + <UploadStockOut ref="stockOut"></UploadStockOut>
  49 + <DeliverProduct ref="deliver"></DeliverProduct>
49 </div> 50 </div>
50 </template> 51 </template>
51 52
@@ -54,7 +55,7 @@ @@ -54,7 +55,7 @@
54 import moment from 'moment'; 55 import moment from 'moment';
55 import service from 'trade-service'; 56 import service from 'trade-service';
56 import Store from '../store/undone'; 57 import Store from '../store/undone';
57 - import { UploadStockOut } from 'components/modal' 58 + import { UploadStockOut, DeliverProduct } from 'components/modal'
58 import { CellPrdInfo, CellDispatch, CellDeliver, CellStockOut } from 'components/cell'; 59 import { CellPrdInfo, CellDispatch, CellDeliver, CellStockOut } from 'components/cell';
59 60
60 export default { 61 export default {
@@ -162,7 +163,7 @@ @@ -162,7 +163,7 @@
162 163
163 }, 164 },
164 sendOut(){ 165 sendOut(){
165 - 166 + this.$refs.deliver.show();
166 }, 167 },
167 setModel(k, v) { 168 setModel(k, v) {
168 this.filters[k].model = v; 169 this.filters[k].model = v;
@@ -182,7 +183,8 @@ @@ -182,7 +183,8 @@
182 CellDispatch, 183 CellDispatch,
183 CellDeliver, 184 CellDeliver,
184 CellStockOut, 185 CellStockOut,
185 - UploadStockOut 186 + UploadStockOut,
  187 + DeliverProduct
186 } 188 }
187 }; 189 };
188 </script> 190 </script>
@@ -113,19 +113,16 @@ export default () => { @@ -113,19 +113,16 @@ export default () => {
113 { 113 {
114 title: '发货', 114 title: '发货',
115 align: 'center', 115 align: 'center',
116 - render(){  
117 - return `<cell-deliver  
118 - :ship-num="row.shipmentsNums">  
119 - </cell-deliver>` 116 + render(row){
  117 + return `<p>发货数:${row.shipmentsNums}</p>`
  118 +
120 } 119 }
121 }, 120 },
122 { 121 {
123 title: '缺货', 122 title: '缺货',
124 align: 'center', 123 align: 'center',
125 - render(){  
126 - return `<cell-stock-out  
127 - :lack-num="row.lackNum"  
128 - ></cell-stock-out>` 124 + render(row){
  125 + return `<p>缺货数:${row.lackNum}</p>`
129 } 126 }
130 }, 127 },
131 { 128 {
@@ -58,8 +58,8 @@ const tradeService = { @@ -58,8 +58,8 @@ const tradeService = {
58 return {}; 58 return {};
59 }); 59 });
60 }, 60 },
61 - allotWarehouseInfo(params) {  
62 - return axios.post(apiUrl.allotWarehouseInfo, params) 61 + allotWarehouseInfo() {
  62 + return axios.post(apiUrl.allotWarehouseInfo)
63 .then(res => { 63 .then(res => {
64 if(res.status === 200) { 64 if(res.status === 200) {
65 return res.data; 65 return res.data;