Commit 4a95b956 authored by zhoutong's avatar zhoutong

Merge branch 'release' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into release

parents df9ba6e5 9576f458
......@@ -515,6 +515,19 @@ export function warehousePictureList(data){
data
})
}
export function warehousePictureCreate(data){
return request({
url: '/order/warehouse-picture/create',
method: 'post',
data
})
}
export function warehousePictureDelete(id){
return request({
url: '/order/warehouse-picture/delete?id=' + id,
method: 'delete'
})
}
// 获得部门订单分页
export function deptOrderPage(params){
......
......@@ -45,6 +45,7 @@
<script>
import { getToken } from "@/utils/auth";
import {warehousePictureCreate} from "@/api/ecw/order";
export default {
props: {
......@@ -63,6 +64,15 @@ export default {
isShowTip: {
type: Boolean,
default: true
},
// 类型 1入仓 2 调拨出仓 3调拨到仓 4 订单转异
type: {
type: Number,
default: undefined
},
id: {
type: Number,
default: undefined
}
},
data() {
......@@ -118,7 +128,7 @@ export default {
handleRemove(index) {
this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList));
this.$emit("delete", index);
},
// 上传成功回调
handleUploadSuccess(res) {
......@@ -128,8 +138,15 @@ export default {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
warehousePictureCreate({
"bizId": this.id,
"type": this.type,
"url": res.data
}).then(() => {
this.$emit("input", this.listToString(this.fileList));
this.$emit("refresh");
this.$modal.closeLoading();
})
}
}else {
this.handleUploadError();
......
......@@ -164,7 +164,15 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" ></image-and-video-upload>
<image-and-video-upload
:fileSize="50"
:isShowTip="true"
v-model="form.urls"
:type="1"
:id="orderId"
@delete="handleDeleteImage"
@refresh="getWarehousePictureList"
></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
......@@ -222,7 +230,7 @@ import {
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList
rollbackDelete, warehousePictureDelete, warehousePictureList
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
......@@ -284,6 +292,8 @@ export default {
sumVolume: '',
sumWeight: '',
},
// form.urls的完整数据
urlsObject: [],
currencyList:[],
order: {},
orderId: undefined,
......@@ -320,6 +330,12 @@ export default {
},
methods: {
// 删除了入仓影像
handleDeleteImage(index) {
warehousePictureDelete(this.urlsObject[index].id).then(() => {
this.urlsObject.splice(index, 1);
})
},
getOrderItemList(){
this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
......@@ -333,7 +349,8 @@ export default {
bizId: this.order.orderId,
type: 1
}).then(r =>{
this.form.urls = r.data.map(i =>i.url)
this.form.urls = r.data.map(i =>i.url).reverse()
this.urlsObject = r.data.reverse()
})
},
include(){
......
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 to comment