Browse Source

1.回显

fix_bug_pro20231227
0.0 2 years ago
parent
commit
2b48a02f08
  1. 322
      src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue

322
src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue

@ -1,23 +1,16 @@
<template>
<basic-container>
<div class="avue-crud">
<el-row>
<el-row >
<!-- 查询模块 -->
<el-form
:inline="true"
ref="form"
:model="form"
label-width="120px"
:rules="rules"
:disabled="view"
>
<el-form :inline="true" ref="form" :model="form" label-width="120px" :rules="rules" :disabled="view">
<!-- 表单字段 -->
<el-col :span="24">
<el-form-item label="入库批次" prop="receiptBatch">
<el-input v-model="form.receiptBatch" placeholder="请输入入库批次" />
<el-input v-model="form.receiptBatch" placeholder="请输入入库批次"/>
</el-form-item>
<el-form-item label="入库时间" prop="receiptDate">
<!-- <el-input v-model="form.receiptDate" placeholder="请输入入库时间"/>-->
<!-- <el-input v-model="form.receiptDate" placeholder="请输入入库时间"/>-->
<el-date-picker
v-model="form.receiptDate"
placeholder="请选择入库时间"
@ -29,7 +22,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="客户名称" prop="clientId">
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>-->
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>-->
<el-select
v-model="form.clientId"
filterable
@ -38,7 +31,7 @@
remote-show-suffix
:remote-method="remoteMethod"
:loading="loading"
@change="getMenDian($event)"
@change="getMenDian($event,1)"
placeholder="请输入客户名称"
>
<el-option
@ -49,16 +42,39 @@
/>
</el-select>
</el-form-item>
<el-form-item label="客户编码" prop="clientCode">
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>-->
<el-select
v-model="form.clientCode"
filterable
remote
reserve-keyword
remote-show-suffix
:remote-method="remoteCodeMethod"
:loading="loading"
@change="getMenDian($event,2)"
placeholder="请输入客户编码"
>
<el-option
v-for="item in optionCodes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="门店名称" prop="storeName">-->
<el-form-item label="门店名称">
<!-- <el-input v-model="form.storeName" placeholder="请输入门店名称"/>-->
<el-form-item label="门店名称" >
<!-- <el-input v-model="form.storeName" placeholder="请输入门店名称"/>-->
<el-select
v-model="form.storeId"
filterable
allow-create
default-first-option
:reserve-keyword="false"
@change="getMen($event, 1)"
@change="getMen($event,1)"
placeholder="请输入门店名称"
>
<el-option
@ -71,25 +87,25 @@
</el-form-item>
</el-col>
<el-col :span="24">
<!-- <el-form-item label="物流单号" prop="trainNumber">-->
<el-form-item label="物流单号">
<el-input v-model="form.trainNumber" placeholder="请输入物流车次" />
<!-- <el-form-item label="物流单号" prop="trainNumber">-->
<el-form-item label="物流车次" >
<el-input v-model="form.trainNumber" placeholder="请输入物流车次"/>
</el-form-item>
<!-- <el-form-item label="入库车牌" prop="licensePlate">-->
<el-form-item label="入库车牌">
<el-input v-model="form.licensePlate" placeholder="请输入入库车牌" />
<!-- <el-form-item label="入库车牌" prop="licensePlate">-->
<el-form-item label="入库车牌" >
<el-input v-model="form.licensePlate" placeholder="请输入入库车牌"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="订单自编号" prop="orderNumber">
<el-form-item label="订单自编号" prop="orderNumber" >
<el-input v-model="form.orderNumber" placeholder="请输入订单自编号" />
</el-form-item>
<!-- <el-form-item label="运单号" prop="waybillNumber ">-->
<!-- <el-input v-model="form.waybillNumber " placeholder="请输入运单号"/>-->
<!-- </el-form-item>-->
<el-form-item label="所在仓库" prop="warehouseId">
<el-form-item label="所在仓库" prop="warehouseId" >
<!-- <el-input placeholder="请输入所在仓库"/>-->
<el-select
v-model="form.warehouseId"
@ -98,7 +114,7 @@
reserve-keyword
remote-show-suffix
:remote-method="remoteWareHouse"
@change="getMen($event, 2)"
@change="getMen($event,2)"
placeholder="请输入所在仓库"
>
<el-option
@ -111,157 +127,97 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="服务类型" prop="serviceType">
<!-- <el-input v-model="form.serviceType" placeholder="请输入服务类型"/>-->
<el-radio-group
v-model="form.serviceType"
class="ml-4"
v-for="(item, index) in distributionType"
>
<el-radio :label="item.dictKey" size="large" style="padding-right: 20px">{{
item.dictValue
}}</el-radio>
<el-form-item label="服务类型" prop="serviceType" >
<!-- <el-input v-model="form.serviceType" placeholder="请输入服务类型"/>-->
<el-radio-group v-model="form.serviceType" class="ml-4" v-for="(item,index) in distributionType">
<el-radio :label="item.dictKey" size="large" style="padding-right: 20px">{{item.dictValue}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-form>
</el-row>
<el-row>
<div class="avue-crud__header">
<el-row >
<div class="avue-crud__header" >
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" :disabled="view"
> </el-button
>
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" :disabled="view"> </el-button>
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
</div>
<!-- 头部右侧按钮模块 -->
<!-- <div class="avue-crud__right">-->
<!-- <el-button icon="el-icon-refresh" @click="searchChange" circle :disabled="view"></el-button>-->
<!-- <el-button icon="el-icon-search" @click="searchHide" circle :disabled="view"></el-button>-->
<!-- </div>-->
<!-- <div class="avue-crud__right">-->
<!-- <el-button icon="el-icon-refresh" @click="searchChange" circle :disabled="view"></el-button>-->
<!-- <el-button icon="el-icon-search" @click="searchHide" circle :disabled="view"></el-button>-->
<!-- </div>-->
</div>
</el-row>
<el-row>
<!-- 列表模块 -->
<el-table
ref="table"
v-loading="loading"
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="data"
:height="height"
style="width: 100%"
:border="option.border"
>
<el-table-column
type="selection"
v-if="option.selection"
width="55"
align="center"
></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center" ></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center" ></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="80" align="center">
</el-table-column>
<template v-for="(item, index) in option.column">
<template v-for="(item,index) in option.column">
<!-- table字段 -->
<el-table-column
v-if="item.hide !== true"
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index"
>
:key="index">
</el-table-column>
</template>
<el-table-column
prop="menu"
label="实际入库数量"
:width="150"
align="center"
v-if="this.$route.query.type == '3'"
>
<template #="{ row }">
<el-table-column prop="menu" label="实际入库数量" :width="150" align="center" v-if="this.$route.query.type == '3'">
<template #="{row}">
<el-input v-model="row.actualReceipt"></el-input>
</template>
</el-table-column>
<!-- 操作栏模块 -->
<el-table-column
prop="menu"
label="操作"
:width="300"
align="center"
v-if="!view || this.$route.query.type != '3'"
>
<template #="{ row }">
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>-->
<el-button
type="primary"
text
icon="el-icon-edit"
@click="handleEditOwn(row)"
:disabled="typeView"
>编辑</el-button
>
<el-button
type="primary"
text
icon="el-icon-delete"
v-if="row.conditions == '1'"
@click="rowDelOwn(row)"
:disabled="typeView"
>删除</el-button
>
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleDrawer(row)">子表配置</el-button>-->
<el-table-column prop="menu" label="操作" :width="300" align="center" v-if="!view || this.$route.query.type != '3'">
<template #="{row}">
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>-->
<el-button type="primary" text icon="el-icon-edit" @click="handleEditOwn(row)" :disabled = typeView>编辑</el-button>
<el-button type="primary" text icon="el-icon-delete" v-if="row.conditions == '1'" @click="rowDelOwn(row)" :disabled = typeView>删除</el-button>
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleDrawer(row)">子表配置</el-button>-->
</template>
</el-table-column>
</el-table>
</el-row>
<div
style="line-height: 20px; text-align: center; padding-top: 10px"
v-if="!typeView || this.$route.query.type == '3'"
>
<div style="line-height: 20px;text-align:center;padding-top: 10px" v-if="!typeView || this.$route.query.type == '3'">
<span class="dialog-footer">
<el-button
type="primary"
icon="el-icon-circle-check"
@click="handleSubmit"
:disabled="view && !this.$route.query.type == '3'"
> </el-button
>
<!-- <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>-->
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" :disabled="view && !this.$route.query.type == '3'"> </el-button>
<!-- <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>-->
</span>
</div>
<!-- <el-row>-->
<!-- <div class="avue-crud__pagination" style="width:100%">-->
<!-- &lt;!&ndash; 分页模块 &ndash;&gt;-->
<!-- <el-pagination align="right"-->
<!-- background-->
<!-- @size-change="sizeChange"-->
<!-- @current-change="currentChange"-->
<!-- :current-page="page.currentPage"-->
<!-- :page-sizes="[30, 50,80, 120]"-->
<!-- :page-size="page.pageSize"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="page.total">-->
<!-- </el-pagination>-->
<!-- </div>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <div class="avue-crud__pagination" style="width:100%">-->
<!-- &lt;!&ndash; 分页模块 &ndash;&gt;-->
<!-- <el-pagination align="right"-->
<!-- background-->
<!-- @size-change="sizeChange"-->
<!-- @current-change="currentChange"-->
<!-- :current-page="page.currentPage"-->
<!-- :page-sizes="[30, 50,80, 120]"-->
<!-- :page-size="page.pageSize"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="page.total">-->
<!-- </el-pagination>-->
<!-- </div>-->
<!-- </el-row>-->
<!-- 表单模块 -->
<el-dialog
:title="title"
<el-dialog :title="title"
v-model="box"
width="50%"
:before-close="beforeClose"
append-to-body
>
<el-form
:disabled="view"
ref="formDetail"
:model="formDetail"
label-width="80px"
:rules="rules"
>
append-to-body>
<el-form :disabled="view" ref="formDetail" :model="formDetail" label-width="80px" :rules="rules">
<!-- 表单字段 -->
<el-form-item label="SKU" prop="sku">
<el-input v-model="formDetail.sku" placeholder="请输入SKU" />
@ -330,8 +286,8 @@
<el-form-item label="包装规格">
<el-input v-model="formDetail.packagingSpecifications" placeholder="请输入包装规格" />
</el-form-item>
<el-form-item label="物资品牌" prop="actualReceipt">
<!-- <el-input v-model="formDetail.actualReceipt" placeholder="请选择物资品牌"/>-->
<el-form-item label="产品品牌" prop="actualReceipt">
<!-- <el-input v-model="formDetail.actualReceipt" placeholder="请选择物资品牌"/>-->
<el-select
v-model="formDetail.brandId"
filterable
@ -340,7 +296,7 @@
remote-show-suffix
:remote-method="getBrandName"
@change="getBanerqd($event)"
placeholder="请输入物资品牌"
placeholder="请输入产品品牌"
>
<el-option
v-for="item in brandList"
@ -442,13 +398,14 @@ export default {
option: option,
//
data: [],
store: [], //
stuffName: [], //
stuffCode: [], //
stuff: [], //
brandList: [], //
shop: [], //
options: [], //
store: [],//
stuffName: [],//
stuffCode: [],//
stuff: [],//
brandList: [],//
shop: [],//
options: [],//
optionCodes: [],//
rules: {
sku: [
{ required: true, message: '请输入SKU', trigger: 'blur' },
@ -494,9 +451,16 @@ export default {
this.getOwnDeliver();
},
deep: true,
immediate: true,
immediate: true
},
'form.clientId': {
handler(newVal) {
console.log("newVal>>>>>>>>>>>>>>>",newVal)
console.log("this.options>>>>>>>>>>>>>>>",this.options)
},
}
},
computed: {
...mapGetters(['permission']),
ids() {
@ -533,6 +497,7 @@ export default {
label: da.customerName,
value: da.clientId,
});
if (!!da.storeId && da.storeId != '-1') {
console.log('门店》》》》');
this.shop.push({
@ -692,10 +657,39 @@ export default {
}
});
}
},
//
async getMenDian(row) {
async getMenDian(row,num){
// console.log("",row);
if (num==1){
const obj = this.options.find(item => item.value === row);
console.log("obj>>>>>>>>>>>",obj);
this.optionCodes =[
{
key:obj.value,
value:obj.value,
label:obj.code,
}
]
this.form.clientCode = obj.value;
} else {
const obj = this.optionCodes.find(item => item.value === row);
console.log("obj>>>>>>>>>>>",obj);
this.options =[
{
key:obj.value,
value:obj.value,
label:obj.code,
}
]
this.form.clientId = obj.value;
}
this.form.serviceType =null;
console.log("");
let aa = '';
this.options.some(i => {
// console.log(">><><><<>",i);
@ -763,7 +757,8 @@ export default {
let st = {
label: i.clientName,
value: i.id,
};
code: i.clientCode
}
this.options.push(st);
});
// setTimeout(() => {
@ -776,9 +771,34 @@ export default {
this.options = [];
}
},
handleEditOwn(row) {
this.title = '编辑';
this.box = true;
//
async remoteCodeMethod(query){
if (query) {
// this.loading = true;
this.optionCodes =[];
let cl = await getListClient(this.page.currentPage, this.page.pageSize,{clientCode:query});
console.log("客户信息1234>>>>",cl.data.data.records);
cl.data.data.records.forEach(i =>{
let st= {
label: i.clientCode,
value: i.id,
code: i.clientName
}
this.optionCodes.push(st);
});
// setTimeout(() => {
// this.loading = false
// this.loading = this.list.filter((item) => {
// return item.label.toLowerCase().includes(query.toLowerCase())
// })
// }, 200)
} else {
this.optionCodes = []
}
},
handleEditOwn (row) {
this.title = '编辑'
this.box = true
this.formDetail = row;
},
//

Loading…
Cancel
Save