xiaoshou
This commit is contained in:
parent
bd2643b1c5
commit
5bfa72f716
|
@ -203,3 +203,11 @@ export function notPackremark(id, data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//物流图片上传
|
||||||
|
export function ship(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/sam/sale/${id}/up_ship/`,
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="入库数量">
|
<el-table-column label="出入库数量">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否需要复验" v-if="this.$route.params.pu_order!=null">
|
<el-table-column label="是否需要复验" v-if="this.$route.params.pu_order!=null">
|
||||||
|
|
|
@ -69,6 +69,13 @@
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="销售状态">
|
||||||
|
<template slot-scope="scope">{{state_[scope.row.state]}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-table-column align="center" label="操作" width="220px">
|
<!-- <el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -181,6 +188,12 @@
|
||||||
mtestform: {
|
mtestform: {
|
||||||
is_mtestok: false,
|
is_mtestok: false,
|
||||||
},
|
},
|
||||||
|
state_: {
|
||||||
|
10: "可出售",
|
||||||
|
20: "销售锁定",
|
||||||
|
30: "已售出",
|
||||||
|
},
|
||||||
|
|
||||||
form1: {},
|
form1: {},
|
||||||
dialogFormVisibleorder: false,
|
dialogFormVisibleorder: false,
|
||||||
orderList: [],
|
orderList: [],
|
||||||
|
|
|
@ -153,12 +153,14 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联客户" prop="customer">
|
<el-form-item label="关联客户" prop="customer" >
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="sale.customer"
|
v-model="sale.customer"
|
||||||
@change="selectcustomer"
|
@change="selectcustomer"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
:disabled="show"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customeroptions"
|
v-for="item in customeroptions"
|
||||||
|
@ -170,15 +172,17 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联合同" prop="contract">
|
<el-form-item label="关联合同" prop="contract">
|
||||||
<el-input v-model="sale.contract" placeholder="关联合同" />
|
<el-input v-model="sale.contract" placeholder="关联合同" :disabled="edit"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="所需产品" prop="product">
|
<el-form-item label="所需产品" prop="product">
|
||||||
<el-select
|
<el-select
|
||||||
|
:disabled="show"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="sale.product"
|
v-model="sale.product"
|
||||||
@change="selectproduct"
|
@change="selectproduct"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
ref="btn"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materialoptions"
|
v-for="item in materialoptions"
|
||||||
|
@ -328,6 +332,8 @@ export default {
|
||||||
materialoptions: [],
|
materialoptions: [],
|
||||||
iproductoptions: [],
|
iproductoptions: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
show:false,
|
||||||
|
edit:true,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
|
@ -375,9 +381,12 @@ export default {
|
||||||
//选择订单变化
|
//选择订单变化
|
||||||
|
|
||||||
selectorder(selval) {
|
selectorder(selval) {
|
||||||
|
|
||||||
getOrder(selval).then((response) => {
|
getOrder(selval).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
this.show=true;
|
||||||
this.sale.customer = response.data.customer;
|
this.sale.customer = response.data.customer;
|
||||||
|
|
||||||
this.sale.product = response.data.product;
|
this.sale.product = response.data.product;
|
||||||
this.sale.contract = response.data.contract_.name;
|
this.sale.contract = response.data.contract_.name;
|
||||||
this.sale.receiver = response.data.customer_.contact;
|
this.sale.receiver = response.data.customer_.contact;
|
||||||
|
@ -540,13 +549,25 @@ export default {
|
||||||
|
|
||||||
//审核
|
//审核
|
||||||
handleAudit(scope) {
|
handleAudit(scope) {
|
||||||
saleAudit(scope.row.id).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
this.$confirm("确认审核?", "提示", {
|
||||||
this.$message.success("审核成功成功");
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "success",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await saleAudit(scope.row.id);
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
this.$message.success("审核成功!");
|
||||||
});
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-descriptions title="基本信息" direction="vertical" :column="8" border>
|
<el-descriptions title="基本信息" direction="vertical" :column="6" border>
|
||||||
<el-descriptions-item label="客户名称" v-if="salesdetail.customer">
|
<el-descriptions-item label="客户名称" v-if="salesdetail.customer">
|
||||||
{{ salesdetail.customer_.name }}</el-descriptions-item
|
{{ salesdetail.customer_.name }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
|
@ -15,180 +15,216 @@
|
||||||
>
|
>
|
||||||
{{ salesdetail.product_.specification }}</el-descriptions-item
|
{{ salesdetail.product_.specification }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
<el-descriptions-item label="订单编号" v-if="salesdetail.order">
|
|
||||||
{{ salesdetail.order_.number }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="合同名称" v-if="salesdetail.order">
|
<el-descriptions-item label="合同名称" v-if="salesdetail.order">
|
||||||
{{ salesdetail.order_.contract_.name }}</el-descriptions-item
|
{{ salesdetail.order_.contract_.name }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
|
<el-descriptions-item label="合同编号" v-if="salesdetail.order">
|
||||||
|
{{ salesdetail.order_.contract_.number }}</el-descriptions-item
|
||||||
|
>
|
||||||
|
<el-descriptions-item label="订单编号" v-if="salesdetail.order">
|
||||||
|
{{ salesdetail.order_.number }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="物流详情" v-if="ship_pic!=''">
|
||||||
|
<el-link :href="salesdetail.ship_pic">物流单</el-link></el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-card class="box-card">
|
<el-button type="primary" style="margin-top:10px" @click="upload">上传物流信息</el-button>
|
||||||
<div slot="header" class="clearfix">
|
</el-card>
|
||||||
<span>关联产品信息</span>
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>关联产品信息</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="singleTable"
|
||||||
|
:data="saleproduct"
|
||||||
|
highlight-current-row
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="产品编号" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="产品名称" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.iproduct_.material_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.iproduct_.batch
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="仓库">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.iproduct_.warehouse_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否已军检">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
|
||||||
|
<el-tag v-else>已军检</el-tag></template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="军检">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
|
||||||
|
<el-tag v-else>合格</el-tag></template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装箱单号" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.packnum }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="未装箱说明" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.remark }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_delete'])"
|
||||||
|
type="primary"
|
||||||
|
@click="handlePack(scope)"
|
||||||
|
>装箱</el-link
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_delete'])"
|
||||||
|
type="primary"
|
||||||
|
@click="handleNotPack(scope)"
|
||||||
|
>备注</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_delete'])"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete(scope)"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogVisibless"
|
||||||
|
title="上传物流文件"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Forms"
|
||||||
|
:model="ship"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<el-form-item label="文件" prop="template" >
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:action="upUrl"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:on-success="handleUpSuccess"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:headers="upHeaders"
|
||||||
|
:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
accept="webp,bmp,jpg,png,tif,gif,apng"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisibless = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="uploadship">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="60%"
|
||||||
|
:title="dialogType === 'edit' ? '编辑装箱单' : '新增装箱单'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="packData"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
|
<el-form-item label="装箱单号" prop="packnum">
|
||||||
|
<el-input v-model="packData.packnum" placeholder="装箱单号" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="装箱文件确认" prop="iproducts">
|
||||||
|
<el-table
|
||||||
|
:data="packlist"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
ref="multipleTable"
|
||||||
|
height="300"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" label="序号" />
|
||||||
|
<el-table-column label="名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单位">
|
||||||
|
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form :model="scope.row">
|
||||||
|
<el-form-item size="mini">
|
||||||
|
<el-input-number
|
||||||
|
v-model="scope.row.count"
|
||||||
|
:min="0"
|
||||||
|
:value="0"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="库存数量">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.material_">{{
|
||||||
|
scope.row.material_.count
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="安全库存数量">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.material_">{{
|
||||||
|
scope.row.material_.count_safe
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisible = false"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="submitPack">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
</el-dialog>
|
||||||
ref="singleTable"
|
<el-dialog
|
||||||
:data="saleproduct"
|
:visible.sync="dialogVisibles"
|
||||||
highlight-current-row
|
:close-on-click-modal="false"
|
||||||
style="width: 100%"
|
width="60%"
|
||||||
|
title="未装箱备注"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="notpackData"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-table-column label="产品编号" show-overflow-tooltip>
|
<el-input v-model="notpackData.remark" placeholder="未装箱备注" />
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
<el-table-column label="产品名称" show-overflow-tooltip>
|
<el-button type="danger" @click="dialogVisibles = false"
|
||||||
<template slot-scope="scope">{{
|
>取消</el-button
|
||||||
scope.row.iproduct_.material_.name
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="批次">
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.iproduct_.batch
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="仓库">
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.iproduct_.warehouse_.name
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否已军检">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
|
|
||||||
<el-tag v-else>已军检</el-tag></template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="军检">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
|
|
||||||
<el-tag v-else>合格</el-tag></template
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="装箱单号" show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">{{ scope.row.packnum }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="未装箱说明" show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">{{ scope.row.remark }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['warehouse_delete'])"
|
|
||||||
type="primary"
|
|
||||||
@click="handlePack(scope)"
|
|
||||||
>装箱</el-link
|
|
||||||
>
|
|
||||||
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['warehouse_delete'])"
|
|
||||||
type="primary"
|
|
||||||
@click="handleNotPack(scope)"
|
|
||||||
>备注</el-link
|
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['warehouse_delete'])"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDelete(scope)"
|
|
||||||
>删除</el-link
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
width="60%"
|
|
||||||
:title="dialogType === 'edit' ? '编辑装箱单' : '新增装箱单'"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
ref="Form"
|
|
||||||
:model="packData"
|
|
||||||
label-width="100px"
|
|
||||||
label-position="right"
|
|
||||||
>
|
>
|
||||||
<el-form-item label="装箱单号" prop="packnum">
|
<el-button type="primary" @click="submitnotPack">确认</el-button>
|
||||||
<el-input v-model="packData.packnum" placeholder="装箱单号" />
|
</div>
|
||||||
</el-form-item>
|
</el-dialog>
|
||||||
|
|
||||||
<el-form-item label="装箱文件确认" prop="iproducts">
|
|
||||||
<el-table
|
|
||||||
:data="packlist"
|
|
||||||
border
|
|
||||||
fit
|
|
||||||
stripe
|
|
||||||
highlight-current-row
|
|
||||||
ref="multipleTable"
|
|
||||||
height="300"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
|
||||||
<el-table-column type="index" width="50" label="序号" />
|
|
||||||
<el-table-column label="名称">
|
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="单位">
|
|
||||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-form :model="scope.row">
|
|
||||||
<el-form-item size="mini">
|
|
||||||
<el-input-number
|
|
||||||
v-model="scope.row.count"
|
|
||||||
:min="0"
|
|
||||||
:value="0"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="库存数量">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.material_">{{
|
|
||||||
scope.row.material_.count
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="安全库存数量">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.material_">{{
|
|
||||||
scope.row.material_.count_safe
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<el-button type="danger" @click="dialogVisible = false"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitPack">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog
|
|
||||||
:visible.sync="dialogVisibles"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
width="60%"
|
|
||||||
title="未装箱备注"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
ref="Form"
|
|
||||||
:model="notpackData"
|
|
||||||
label-width="100px"
|
|
||||||
label-position="right"
|
|
||||||
>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="notpackData.remark" placeholder="未装箱备注" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<el-button type="danger" @click="dialogVisibles = false"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitnotPack">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-card>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -200,14 +236,15 @@ import {
|
||||||
gePack,
|
gePack,
|
||||||
subPack,
|
subPack,
|
||||||
notPackremark,
|
notPackremark,
|
||||||
|
ship
|
||||||
} from "@/api/sam";
|
} from "@/api/sam";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultepackData = {
|
const defaultepackData = {
|
||||||
packnum: ""
|
packnum: "",
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
data() {
|
data() {
|
||||||
|
@ -215,17 +252,22 @@ export default {
|
||||||
salesdetail: "",
|
salesdetail: "",
|
||||||
saleproduct: "",
|
saleproduct: "",
|
||||||
packlist: [],
|
packlist: [],
|
||||||
|
upHeaders: upHeaders(),
|
||||||
|
upUrl: upUrl(),
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogVisibles:false,
|
dialogVisibles: false,
|
||||||
packData:defaultepackData,
|
dialogVisibless: false,
|
||||||
notpackData:{remark:""},
|
ship:{},
|
||||||
|
packData: defaultepackData,
|
||||||
|
notpackData: { remark: "" },
|
||||||
detail: [],
|
detail: [],
|
||||||
|
fileList:[],
|
||||||
saleproductId: null,
|
saleproductId: null,
|
||||||
saleProductid:null,
|
saleProductid: null,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
|
@ -243,6 +285,39 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//上传物流文件
|
||||||
|
handlePreview(file) {
|
||||||
|
if ("url" in file) {
|
||||||
|
window.open(file.url);
|
||||||
|
} else {
|
||||||
|
window.open(file.response.data.path);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleUpSuccess(res, file, filelist) {
|
||||||
|
this.ship.path = res.data.path;
|
||||||
|
console.log(this.ship.path)
|
||||||
|
},
|
||||||
|
handleRemove(file, filelist){
|
||||||
|
this.ship.path = null;
|
||||||
|
},
|
||||||
|
upload() {
|
||||||
|
|
||||||
|
this.dialogVisibless=true;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
uploadship()
|
||||||
|
{
|
||||||
|
console.log(this.ship);
|
||||||
|
ship(this.id, this.ship).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
|
||||||
|
this.dialogVisibless = false;
|
||||||
|
this.$message.success("物流文件上传成功!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
getSaleproductLists() {
|
getSaleproductLists() {
|
||||||
getSaleproductList({ sale: this.id, page: 0 }).then((response) => {
|
getSaleproductList({ sale: this.id, page: 0 }).then((response) => {
|
||||||
|
@ -268,31 +343,24 @@ export default {
|
||||||
},
|
},
|
||||||
//装箱操作
|
//装箱操作
|
||||||
handlePack(scope) {
|
handlePack(scope) {
|
||||||
this.packData = Object.assign({}, scope.row);
|
this.packData = Object.assign({}, scope.row);
|
||||||
this.dialogType = "new";
|
this.dialogType = "new";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
|
|
||||||
});
|
});
|
||||||
gePack(scope.row.id).then((response) => {
|
gePack(scope.row.id).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.packlist = response.data.detail;
|
this.packlist = response.data.detail;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.saleproductId = scope.row.id;
|
this.saleproductId = scope.row.id;
|
||||||
},
|
},
|
||||||
|
|
||||||
submitPack() {
|
submitPack() {
|
||||||
this.$refs.multipleTable.selection.forEach((item) => {
|
this.packData.detail = this.packlist;
|
||||||
this.detail.push({
|
console.log(this.packData);
|
||||||
id: item.id,
|
|
||||||
count: item.count,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
console.log( this.detail);
|
|
||||||
this.packData.detail = this.detail;
|
|
||||||
subPack(this.saleproductId, this.packData).then((res) => {
|
subPack(this.saleproductId, this.packData).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getSaleproductLists();
|
this.getSaleproductLists();
|
||||||
|
@ -302,14 +370,11 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//未装箱备注
|
//未装箱备注
|
||||||
handleNotPack(scope)
|
handleNotPack(scope) {
|
||||||
{
|
this.dialogVisibles = true;
|
||||||
this.dialogVisibles=true;
|
this.saleProductid = scope.row.id;
|
||||||
this.saleProductid=scope.row.id;
|
},
|
||||||
}
|
submitnotPack() {
|
||||||
,
|
|
||||||
submitnotPack()
|
|
||||||
{
|
|
||||||
notPackremark(this.saleProductid, this.notpackData).then((res) => {
|
notPackremark(this.saleProductid, this.notpackData).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getSaleproductLists();
|
this.getSaleproductLists();
|
||||||
|
@ -317,7 +382,7 @@ export default {
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue