Commit 9576f458 authored by Marcus's avatar Marcus
parent 465c89da
...@@ -515,6 +515,19 @@ export function warehousePictureList(data){ ...@@ -515,6 +515,19 @@ export function warehousePictureList(data){
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){ export function deptOrderPage(params){
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<script> <script>
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { number } from 'echarts/lib/export' import {warehousePictureCreate} from "@/api/ecw/order";
export default { export default {
props: { props: {
...@@ -69,6 +69,10 @@ export default { ...@@ -69,6 +69,10 @@ export default {
type: { type: {
type: Number, type: Number,
default: undefined default: undefined
},
id: {
type: Number,
default: undefined
} }
}, },
data() { data() {
...@@ -122,10 +126,9 @@ export default { ...@@ -122,10 +126,9 @@ export default {
methods: { methods: {
// 删除图片 // 删除图片
handleRemove(index) { handleRemove(index) {
// todo
console.log(index)
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));
this.$emit("delete", index);
}, },
// 上传成功回调 // 上传成功回调
handleUploadSuccess(res) { handleUploadSuccess(res) {
...@@ -135,10 +138,15 @@ export default { ...@@ -135,10 +138,15 @@ export default {
this.fileList = this.fileList.concat(this.uploadList); this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = []; this.uploadList = [];
this.number = 0; this.number = 0;
// todo warehousePictureCreate({
console.log(res.data) "bizId": this.id,
"type": this.type,
"url": res.data
}).then(() => {
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));
this.$emit("refresh");
this.$modal.closeLoading(); this.$modal.closeLoading();
})
} }
}else { }else {
this.handleUploadError(); this.handleUploadError();
......
...@@ -164,7 +164,15 @@ ...@@ -164,7 +164,15 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span> <span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div> </div>
<div> <div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" :type="1"></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> </div>
</el-card> </el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)"> <div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
...@@ -222,7 +230,7 @@ import { ...@@ -222,7 +230,7 @@ import {
getOrderWarehouseIn, getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId, getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish, orderWarehouseInUpdateLabel, orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList rollbackDelete, warehousePictureDelete, warehousePictureList
} from '@/api/ecw/order' } from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo" import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog' import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
...@@ -284,6 +292,8 @@ export default { ...@@ -284,6 +292,8 @@ export default {
sumVolume: '', sumVolume: '',
sumWeight: '', sumWeight: '',
}, },
// form.urls的完整数据
urlsObject: [],
currencyList:[], currencyList:[],
order: {}, order: {},
orderId: undefined, orderId: undefined,
...@@ -320,6 +330,12 @@ export default { ...@@ -320,6 +330,12 @@ export default {
}, },
methods: { methods: {
// 删除了入仓影像
handleDeleteImage(index) {
warehousePictureDelete(this.urlsObject[index].id).then(() => {
this.urlsObject.splice(index, 1);
})
},
getOrderItemList(){ getOrderItemList(){
this.orderItemList = [] this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data) return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
...@@ -333,7 +349,8 @@ export default { ...@@ -333,7 +349,8 @@ export default {
bizId: this.order.orderId, bizId: this.order.orderId,
type: 1 type: 1
}).then(r =>{ }).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(){ 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