入库整理
parent
8e75d1addd
commit
0bfaa367e4
|
|
@ -76,4 +76,12 @@ export function zjRegister(ids) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del,zlRegister,cyRegister,zjRegister }
|
export function deleteAsnAndDetail(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/asn/deleteAsnAndDetail',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del,zlRegister,cyRegister,zjRegister ,getIdByAsn,deleteAsnAndDetail}
|
||||||
|
|
|
||||||
|
|
@ -80,4 +80,4 @@ export function stockMsg(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {add, edit, del, containerIn, containerOut, updateStockStatus, stockMsg}
|
export default {add, edit, del, containerIn, containerOut, updateStockStatus, stockMsg,queryKyStockList}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container" >
|
<div class="app-container">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<div v-if="crud.props.searchToggle" >
|
<div v-if="crud.props.searchToggle" type="flex">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<!-- <label class="el-form-item-label">单号</label>-->
|
<!-- <label class="el-form-item-label">单号</label>-->
|
||||||
<el-input v-model="query.code" clearable placeholder="单号" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
<el-input v-model="query.code" clearable placeholder="凭证号" style="width: 250px;" class="filter-item"
|
||||||
<!-- <label class="el-form-item-label">库区</label>-->
|
@keyup.enter.native="crud.toQuery"/>
|
||||||
<!-- <el-input v-model="query.areaId" clearable placeholder="库区" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
|
|
||||||
<el-select v-model="query.areaCode" clearable placeholder="库区" value-key="id" class="filter-item" @keyup.enter.native="crud.toQuery" >
|
|
||||||
<el-option
|
|
||||||
style="width: 180px"
|
|
||||||
v-for="item in areaOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.code"
|
|
||||||
:value="item.code"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
<!-- <el-input v-model="query.orderDate" clearable placeholder="订单日期" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
|
<el-select v-model="query.status" clearable placeholder="状态" value-key="id" class="filter-item"
|
||||||
<!-- <label class="el-form-item-label">状态</label>-->
|
@keyup.enter.native="crud.toQuery">
|
||||||
<el-select v-model="query.status" clearable placeholder="状态" value-key="id" class="filter-item" @keyup.enter.native="crud.toQuery" >
|
|
||||||
<el-option
|
<el-option
|
||||||
style="width: 180px"
|
style="width: 180px"
|
||||||
v-for="item in this.dict.asn_status"
|
v-for="item in this.dict.asn_status"
|
||||||
|
|
@ -31,21 +19,12 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<rrOperation :crud="crud" />
|
<rrOperation :crud="crud"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container" v-loading="this.loading_add" element-loading-text="拼命加载中" element-loading-background="rgba(0, 0, 0, 0.1)">
|
<div class="head-container" v-loading="this.loading_add" element-loading-text="拼命加载中"
|
||||||
|
element-loading-background="rgba(0, 0, 0, 0.1)">
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<!-- <el-button-->
|
<viewAsnDetail ref="viewAsnDetail"/>
|
||||||
<!-- slot="right"-->
|
|
||||||
<!-- class="filter-item"-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- icon="el-icon-plus"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- @click="inserAsnOnOffM()"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 新增-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<viewAsnDetail ref="viewAsnDetail" />
|
|
||||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
|
|
@ -59,6 +38,7 @@
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -69,6 +49,7 @@
|
||||||
整理
|
整理
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -79,6 +60,7 @@
|
||||||
抽样
|
抽样
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -89,6 +71,7 @@
|
||||||
质检
|
质检
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -98,18 +81,6 @@
|
||||||
@click="invVerifyS(crud.selections)">
|
@click="invVerifyS(crud.selections)">
|
||||||
整单入库
|
整单入库
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- slot="right"-->
|
|
||||||
<!-- class="filter-item"-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- icon="el-icon-plus"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="crud.selections.length!=1"-->
|
|
||||||
<!-- @click="asnDetailRouter(crud.selections)"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 明细-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -164,7 +135,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" style="float: left">
|
<el-form-item label="备注" style="float: left">
|
||||||
<el-input type="textarea" :rows="2" v-model="asnFrom.description" style="width: 400px;"/>
|
<el-input type="textarea" :rows="2" v-model="asnFrom.description" style="width: 400px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
@ -179,7 +150,7 @@
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
<el-form-item label="单号" prop="code">
|
<el-form-item label="单号" prop="code">
|
||||||
<el-input :disabled="true" v-model="form.code" style="width: 200px;"/>
|
<el-input :disabled="true" v-model="form.code" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库区" prop="area">
|
<el-form-item label="库区" prop="area">
|
||||||
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
<!-- <el-input v-model="form.area" style="width: 370px;"/>-->
|
||||||
|
|
@ -198,7 +169,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单据类型">
|
<el-form-item label="单据类型">
|
||||||
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
<!-- <el-input v-model="form.billType" style="width: 370px;"/>-->
|
||||||
<el-select v-model="form.billType" clearable placeholder="请选择单据类型" value-key="id" style="width: 200px">
|
<el-select v-model="form.billType" clearable placeholder="请选择单据类型" value-key="id"
|
||||||
|
style="width: 200px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in billTypeOptions"
|
v-for="item in billTypeOptions"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
|
|
@ -220,18 +192,19 @@
|
||||||
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight" @select="invVerifySTFM" @select-all="invVerifySTFAll" border
|
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight" @select="invVerifySTFM"
|
||||||
|
@select-all="invVerifySTFAll" border
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column prop="code" label="单号" width="120px" align="center"/>
|
<el-table-column prop="code" label="凭证号" width="120px" align="center" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column prop="area" label="库区" width="140px" align="center">
|
<el-table-column prop="orderDate" label="订单日期" width="120px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.area.name }}
|
{{ formatDate1(scope.row.orderDate) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="billType" label="单据类型">
|
<el-table-column prop="billType" label="单据类型">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.billType.name}}
|
{{ scope.row.billType.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="状态" align="center">
|
<el-table-column prop="status" label="状态" align="center">
|
||||||
|
|
@ -239,39 +212,34 @@
|
||||||
{{ dict.label.asn_status[scope.row.status] }}
|
{{ dict.label.asn_status[scope.row.status] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderDate" label="订单日期" width="140px" align="center">
|
<el-table-column prop="orderQuantity" label="待收数量" align="center"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="receivedQuantity" label="已收数量" align="center"/>
|
||||||
{{formatDate1(scope.row.orderDate)}}
|
<el-table-column prop="zlBy" label="SAP收货人" align="center"/>
|
||||||
</template>
|
<el-table-column prop="cyBy" label="申请人" align="center"/>
|
||||||
</el-table-column>
|
<el-table-column prop="cusCode" label="SAP接口号" align="center"/>
|
||||||
<el-table-column prop="zlDate" label="整理日期" width="140px" align="center"/>
|
<el-table-column v-if="checkPer(['admin','asn:edit','asn:del'])" label="操作" align="center" fixed="right">
|
||||||
<el-table-column prop="cyDate" label="抽样日期" width="140px" align="center"/>
|
|
||||||
<el-table-column prop="zjDate" label="质检日期" width="140px" align="center"/>
|
|
||||||
<el-table-column prop="receivedDate" label="收货日期" width="140px" align="center"/>
|
|
||||||
<el-table-column prop="orderQuantity" label="订单数量" align="center"/>
|
|
||||||
<el-table-column prop="receivedQuantity" label="收货数量" align="center"/>
|
|
||||||
<el-table-column prop="createBy" label="创建人" align="center"/>
|
|
||||||
<el-table-column prop="createTime" label="创建时间" width="140px" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ formatDate1(scope.row.createTime)}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="checkPer(['admin','asn:edit','asn:del'])" label="操作" width="175px" align="center" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
icon="el-icon-edit"
|
||||||
size="mini"
|
size="mini"
|
||||||
style="float: right"
|
|
||||||
@click="asnDetailRouter(scope.row)"
|
@click="asnDetailRouter(scope.row)"
|
||||||
|
/>
|
||||||
|
<el-popconfirm
|
||||||
|
title="是否确定删除?"
|
||||||
|
@confirm="deleteAsnAndDetail(scope.row)"
|
||||||
>
|
>
|
||||||
明细
|
<el-button
|
||||||
</el-button>
|
class="filter-item"
|
||||||
<udOperation
|
slot="reference"
|
||||||
:data="scope.row"
|
type="danger"
|
||||||
:permission="permission"
|
icon="el-icon-delete"
|
||||||
>
|
size="mini"
|
||||||
</udOperation>
|
|
||||||
|
/>
|
||||||
|
</el-popconfirm>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -288,18 +256,18 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DateRangePicker from "@/components/DateRangePicker/index.vue";
|
import DateRangePicker from "@/components/DateRangePicker/index.vue";
|
||||||
import crudAsn, { getCodeNo, queryAsnAll, save,zlRegister,cyRegister,zjRegister } from '@/api/asn'
|
import crudAsn, {getCodeNo, queryAsnAll, save, zlRegister, cyRegister, zjRegister} from '@/api/asn'
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation.vue'
|
import rrOperation from '@crud/RR.operation.vue'
|
||||||
import crudOperation from '@crud/CRUD.operation.vue'
|
import crudOperation from '@crud/CRUD.operation.vue'
|
||||||
import udOperation from '@crud/UD.operation.vue'
|
import udOperation from '@crud/UD.operation.vue'
|
||||||
import pagination from '@crud/Pagination.vue'
|
import pagination from '@crud/Pagination.vue'
|
||||||
import { getAreas } from '@/api/area'
|
import {getAreas} from '@/api/area'
|
||||||
import { getBillType } from '@/api/billType'
|
import {getBillType} from '@/api/billType'
|
||||||
import { add, invVerify, queryAsnDetailAll } from '@/api/asnDetail'
|
import {add, invVerify, queryAsnDetailAll} from '@/api/asnDetail'
|
||||||
import { queryPointList } from '@/api/point'
|
import {queryPointList} from '@/api/point'
|
||||||
import { queryItemAll } from '@/api/item'
|
import {queryItemAll} from '@/api/item'
|
||||||
import { formatDate } from '@/utils/commonUtils'
|
import {formatDate} from '@/utils/commonUtils'
|
||||||
import {xbjsOut} from "@/api/pickOut";
|
import {xbjsOut} from "@/api/pickOut";
|
||||||
import viewAsnDetail from "@/views/business-asn/asn/viewAsnDetail.vue"
|
import viewAsnDetail from "@/views/business-asn/asn/viewAsnDetail.vue"
|
||||||
|
|
||||||
|
|
@ -333,15 +301,15 @@ const defaultForm = {
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Asn',
|
name: 'Asn',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation,DateRangePicker,viewAsnDetail },
|
components: {pagination, crudOperation, rrOperation, udOperation, DateRangePicker, viewAsnDetail},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
dicts: ['asn_status'],
|
dicts: ['asn_status'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: 'asn', url: 'api/asn', idField: 'id', sort: 'id,desc', crudMethod: { ...crudAsn }, optShow: {
|
title: 'asn', url: 'api/asn', idField: 'id', sort: 'id,desc', crudMethod: {...crudAsn}, optShow: {
|
||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: true,
|
del: false,
|
||||||
reset: false,
|
reset: false,
|
||||||
download: false
|
download: false
|
||||||
},
|
},
|
||||||
|
|
@ -360,22 +328,22 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '单号不能为空', trigger: 'blur' }
|
{required: true, message: '单号不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
area: [
|
area: [
|
||||||
{ required: true, message: '库区不能为空', trigger: 'blur' }
|
{required: true, message: '库区不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
orderDate: [
|
orderDate: [
|
||||||
{ required: true, message: '订单日期不能为空', trigger: 'blur' }
|
{required: true, message: '订单日期不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
queryTypeOptions: [
|
queryTypeOptions: [
|
||||||
{ key: 'code', display_name: '单号' },
|
{key: 'code', display_name: '单号'},
|
||||||
{ key: 'areaCode', display_name: '库区' },
|
{key: 'areaCode', display_name: '库区'},
|
||||||
{ key: 'status', display_name: '状态查询' },
|
{key: 'status', display_name: '状态查询'},
|
||||||
],
|
],
|
||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
loading_add:false,
|
loading_add: false,
|
||||||
billTypeOptions: [],
|
billTypeOptions: [],
|
||||||
//新增数据的弹窗开关
|
//新增数据的弹窗开关
|
||||||
inserAsnOnOff: false,
|
inserAsnOnOff: false,
|
||||||
|
|
@ -444,10 +412,12 @@ export default {
|
||||||
itemListData: [],
|
itemListData: [],
|
||||||
pointList: [],
|
pointList: [],
|
||||||
asnOptions: [],
|
asnOptions: [],
|
||||||
invVerifySTF:true,
|
invVerifySTF: true,
|
||||||
viewZl:true,
|
viewZl: true,
|
||||||
viewCy:true,
|
viewCy: true,
|
||||||
viewZj:true
|
viewZj: true,
|
||||||
|
asnIdList: []
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -464,7 +434,7 @@ export default {
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
formatDate1(value){
|
formatDate1(value) {
|
||||||
return formatDate(value);
|
return formatDate(value);
|
||||||
// const date = new Date(value)
|
// const date = new Date(value)
|
||||||
// const year = date.getUTCFullYear()
|
// const year = date.getUTCFullYear()
|
||||||
|
|
@ -490,7 +460,7 @@ export default {
|
||||||
},
|
},
|
||||||
//新政的开关
|
//新政的开关
|
||||||
inserAsnOnOffM() {
|
inserAsnOnOffM() {
|
||||||
this.$refs.viewAsnDetail.dialogInsertAsn=true
|
this.$refs.viewAsnDetail.dialogInsertAsn = true
|
||||||
//this.$router.push({path:'/business-asn/viewAsnDetail'})
|
//this.$router.push({path:'/business-asn/viewAsnDetail'})
|
||||||
},
|
},
|
||||||
//获取当前时间
|
//获取当前时间
|
||||||
|
|
@ -506,7 +476,7 @@ export default {
|
||||||
crudAsn.add(data).then(res => {
|
crudAsn.add(data).then(res => {
|
||||||
this.$message.success('新增成功')
|
this.$message.success('新增成功')
|
||||||
this.inserAsnOnOff = false
|
this.inserAsnOnOff = false
|
||||||
this.asnFrom=defaultForm;
|
this.asnFrom = defaultForm;
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -536,70 +506,70 @@ export default {
|
||||||
this.asnOptions = res
|
this.asnOptions = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
asnDetailRouter(datas){
|
asnDetailRouter(datas) {
|
||||||
this.$refs.viewAsnDetail.dialogInsertAsn=true
|
this.$refs.viewAsnDetail.asnFrom = datas
|
||||||
this.$refs.viewAsnDetail.asnFrom=datas
|
|
||||||
this.$refs.viewAsnDetail.queryAsnDetail(datas.id)
|
this.$refs.viewAsnDetail.queryAsnDetail(datas.id)
|
||||||
|
this.$refs.viewAsnDetail.dialogInsertAsn = true
|
||||||
//this.$router.push({path:'/business-asn/viewAsnDetail',query: {ids:datas.id}})
|
//this.$router.push({path:'/business-asn/viewAsnDetail',query: {ids:datas.id}})
|
||||||
},
|
},
|
||||||
//入库批量确认
|
//入库批量确认
|
||||||
invVerifyS(data){
|
invVerifyS(data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (const idsKey of data) {
|
for (const idsKey of data) {
|
||||||
ids.push(idsKey.id);
|
ids.push(idsKey.id);
|
||||||
}
|
}
|
||||||
invVerify(ids).then(res=>{
|
invVerify(ids).then(res => {
|
||||||
// if (res != null){
|
// if (res != null){
|
||||||
// this.$message.error(res)
|
// this.$message.error(res)
|
||||||
// }else {
|
// }else {
|
||||||
this.$message.success(res)
|
this.$message.success(res)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
invVerifySTFM(selection, row){
|
invVerifySTFM(selection, row) {
|
||||||
if (selection.length>0){
|
if (selection.length > 0) {
|
||||||
this.invVerifySTF = false;
|
this.invVerifySTF = false;
|
||||||
this.viewZl = false;
|
this.viewZl = false;
|
||||||
this.viewCy = false;
|
this.viewCy = false;
|
||||||
this.viewZj = false;
|
this.viewZj = false;
|
||||||
}else {
|
} else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//判断
|
//判断
|
||||||
for (const selectionElement of selection) {
|
for (const selectionElement of selection) {
|
||||||
//收货完成
|
//收货完成
|
||||||
if (selectionElement.status === 'RECEIVED'){
|
if (selectionElement.status === 'RECEIVED') {
|
||||||
this.invVerifySTF = true;
|
this.invVerifySTF = true;
|
||||||
this.viewZl = true;
|
this.viewZl = true;
|
||||||
this.viewCy = true;
|
this.viewCy = true;
|
||||||
this.viewZj = true;
|
this.viewZj = true;
|
||||||
}
|
}
|
||||||
if (selectionElement.status !== 'OPEN'){
|
if (selectionElement.status !== 'OPEN') {
|
||||||
this.viewZl = true;
|
this.viewZl = true;
|
||||||
}
|
}
|
||||||
if (selectionElement.status !== 'OPEN'&&selectionElement.status !== 'ZL'){
|
if (selectionElement.status !== 'OPEN' && selectionElement.status !== 'ZL') {
|
||||||
this.viewCy = true;
|
this.viewCy = true;
|
||||||
}
|
}
|
||||||
if (selectionElement.status !== 'OPEN'&&selectionElement.status !== 'ZL'&&selectionElement.status !== 'CY'){
|
if (selectionElement.status !== 'OPEN' && selectionElement.status !== 'ZL' && selectionElement.status !== 'CY') {
|
||||||
this.viewZj = true;
|
this.viewZj = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
invVerifySTFAll(selection){
|
invVerifySTFAll(selection) {
|
||||||
if (selection.length>0){
|
if (selection.length > 0) {
|
||||||
this.invVerifySTF = false;
|
this.invVerifySTF = false;
|
||||||
this.viewZl = true;
|
this.viewZl = true;
|
||||||
this.viewCy = true;
|
this.viewCy = true;
|
||||||
this.viewZj = true;
|
this.viewZj = true;
|
||||||
}else {
|
} else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//判断
|
//判断
|
||||||
for (const selectionElement of selection) {
|
for (const selectionElement of selection) {
|
||||||
//打开/收货中
|
//打开/收货中
|
||||||
if (selectionElement.status === 'RECEIVED'){
|
if (selectionElement.status === 'RECEIVED') {
|
||||||
this.invVerifySTF = true;
|
this.invVerifySTF = true;
|
||||||
this.viewZl = true;
|
this.viewZl = true;
|
||||||
this.viewCy = true;
|
this.viewCy = true;
|
||||||
|
|
@ -607,46 +577,58 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
zlBtn(data){
|
zlBtn(data) {
|
||||||
this.loading_add=true;
|
this.loading_add = true;
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (const obj of data) {
|
for (const obj of data) {
|
||||||
ids.push(obj.id)
|
ids.push(obj.id)
|
||||||
}
|
}
|
||||||
zlRegister(ids).then(res=>{
|
zlRegister(ids).then(res => {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
this.$message.success("整理登记完成")
|
this.$message.success("整理登记完成")
|
||||||
},e=>{
|
}, e => {
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cyBtn(data){
|
cyBtn(data) {
|
||||||
this.loading_add=true;
|
this.loading_add = true;
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (const obj of data) {
|
for (const obj of data) {
|
||||||
ids.push(obj.id)
|
ids.push(obj.id)
|
||||||
}
|
}
|
||||||
cyRegister(ids).then(res=>{
|
cyRegister(ids).then(res => {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
this.$message.success("抽样登记完成")
|
this.$message.success("抽样登记完成")
|
||||||
},e=>{
|
}, e => {
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
zjBtn(data){
|
zjBtn(data) {
|
||||||
this.loading_add=true;
|
this.loading_add = true;
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (const obj of data) {
|
for (const obj of data) {
|
||||||
ids.push(obj.id)
|
ids.push(obj.id)
|
||||||
}
|
}
|
||||||
zjRegister(ids).then(res=>{
|
zjRegister(ids).then(res => {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
this.$message.success("质检登记完成")
|
this.$message.success("质检登记完成")
|
||||||
},e=>{
|
}, e => {
|
||||||
this.loading_add=false;
|
this.loading_add = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteAsnAndDetail(data) {
|
||||||
|
this.asnIdList.push(data.id)
|
||||||
|
crudAsn.deleteAsnAndDetail(this.asnIdList).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS);
|
||||||
|
this.crud.toQuery();
|
||||||
|
} else {
|
||||||
|
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
center
|
center
|
||||||
top="0.5vh"
|
top="0.5vh"
|
||||||
:fullscreen="fullscreen"
|
:fullscreen="fullscreen"
|
||||||
width="80%"
|
width="85%"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
|
|
@ -52,12 +52,12 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="凭证号" prop="code">
|
<el-form-item label="凭证号">
|
||||||
<el-input v-model="asnFrom.code"/>
|
<el-input :disabled="true" v-model="asnFrom.code"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="订单数量">
|
<el-form-item label="待收数量">
|
||||||
<el-input :disabled="true" v-model.number="asnFrom.orderQuantity"/>
|
<el-input :disabled="true" v-model.number="asnFrom.orderQuantity"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -75,6 +75,29 @@
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||||
<el-button
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
:disabled="this.asnFrom.id == null||!this.asnFrom.status=='OPEN'"
|
||||||
|
@click="insertAsnDetail"
|
||||||
|
:loading="logining1"
|
||||||
|
>
|
||||||
|
添加明细
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
:disabled="!(crud.selections.length === 1)"
|
||||||
|
@click="asnDetailZl(crud.selections)"
|
||||||
|
:loading="logining1"
|
||||||
|
>
|
||||||
|
明细整理
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -85,6 +108,7 @@
|
||||||
整单入库
|
整单入库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -96,6 +120,7 @@
|
||||||
单一入库
|
单一入库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="false"
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -107,6 +132,7 @@
|
||||||
取消收货
|
取消收货
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
|
v-if="false"
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
slot='right'
|
slot='right'
|
||||||
|
|
@ -172,13 +198,16 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="checkPer(['admin','asnDetail:edit','asnDetail:del'])" label="操作"
|
<el-table-column v-if="checkPer(['admin','asnDetail:edit','asnDetail:del'])" label="操作"
|
||||||
width="150px"
|
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
style="float: left"
|
||||||
|
size="mini" type="primary" icon="el-icon-edit" @click="toEditAsnDetail(scope.row)"/>
|
||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
|
:show-edit="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -231,12 +260,18 @@
|
||||||
<el-button type="primary" @click="rkAndQxButtonM(2)">确认</el-button>
|
<el-button type="primary" @click="rkAndQxButtonM(2)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
<el-dialog
|
||||||
:title="crud.status.title" width="400px"
|
:visible.sync="dialogInsertAsnDetail"
|
||||||
|
center
|
||||||
|
width="400px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:before-close="handleAsnDetailClose"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-form ref="form" :rules="asnDetailRules" :model="form" size="small" label-width="80px"
|
<el-form ref="form" :rules="asnDetailRules" :model="form" size="small" label-width="80px"
|
||||||
style="height: 200px"
|
style="height: 300px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="物料" prop="item" style="float: left">
|
<el-form-item label="物料" prop="item" style="float: left">
|
||||||
|
|
@ -258,39 +293,115 @@
|
||||||
<el-form-item label="订单数量" prop="orderQty" style="float: left">
|
<el-form-item label="订单数量" prop="orderQty" style="float: left">
|
||||||
<el-input v-model="form.orderQty" style="width: 200px;"/>
|
<el-input v-model="form.orderQty" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="pointTF" label="库位" prop="point" style="float: left">
|
<el-form-item v-if="isBatch" label="批次号" prop="propC1" style="float: left">
|
||||||
<el-select v-model="form.point" value-key="id" filterable placeholder="请选择库位" clearable
|
|
||||||
style="width: 200px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in pointOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.code"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="viewPropC1" label="批次号" prop="propC1" style="float: left">
|
|
||||||
<el-input v-model="form.propC1" style="width: 200px;"/>
|
<el-input v-model="form.propC1" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="viewPropC2" label="序列号" prop="propC2" style="float: left">
|
<el-form-item v-if="isSerial" label="序列号" prop="propC2" style="float: left">
|
||||||
<el-input v-model="form.propC2" style="width: 200px;"/>
|
<el-input v-model="form.propC2" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="isValidPeriod" label="生成日期" prop="propD1" style="float: left">
|
||||||
|
<el-input v-model="form.propD1" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark" style="float: left">
|
<el-form-item label="备注" prop="remark" style="float: left">
|
||||||
<el-input type="textarea" :rows="2" v-model="form.remark" style="width: 200px;"/>
|
<el-input type="textarea" :rows="2" v-model="form.remark" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button @click="asnDetailCel">取消</el-button>
|
||||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="asnDetailConf">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 明细整理-->
|
||||||
|
<el-dialog
|
||||||
|
title="明细整理"
|
||||||
|
:visible.sync="zlDialogVisible"
|
||||||
|
width="30%"
|
||||||
|
:before-close="handleZlClose">
|
||||||
|
<el-form :model="zlForm" :rules="zlRules" ref="zlForm" label-width="100px" class="demo-ruleForm">
|
||||||
|
<el-form-item label="料号">
|
||||||
|
<el-input v-model="zlForm.item.code"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料描述">
|
||||||
|
<el-input v-model="zlForm.item.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="待收数量">
|
||||||
|
<el-input v-model.number="zlForm.orderQty"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="订单日期">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 370px"
|
||||||
|
v-model="zlForm.asn.orderDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="库区" prop="area">
|
||||||
|
<el-select v-model="zlForm.area" value-key="id"
|
||||||
|
placeholder="请选择库区" clearable filterable style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="areas in areaOptions"
|
||||||
|
:key="areas.id"
|
||||||
|
:label="areas.name"
|
||||||
|
:value="areas"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="库位" prop="loc">
|
||||||
|
<el-select v-model="zlForm.loc" value-key="id"
|
||||||
|
@focus="getPointList(null,null,null)"
|
||||||
|
placeholder="请选择库位" clearable filterable style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="points in pointOptions"
|
||||||
|
:key="points.id"
|
||||||
|
:label="points.name"
|
||||||
|
:value="points"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="收货数量">
|
||||||
|
<el-input v-model.number="zlForm.receivedQty"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="容器" prop="stock">
|
||||||
|
<el-select v-model="zlForm.stock" value-key="id"
|
||||||
|
@focus="queryStock()"
|
||||||
|
placeholder="请选择容器" clearable filterable style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="stocks in stockOptions"
|
||||||
|
:key="stocks.id"
|
||||||
|
:label="stocks.name"
|
||||||
|
:value="stocks"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="zhengliCel">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="zhengli">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudAsnDetail, {rkAndQxButton} from '@/api/asnDetail'
|
import crudAsnDetail, {add, rkAndQxButton} from '@/api/asnDetail'
|
||||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation.vue'
|
import rrOperation from '@crud/RR.operation.vue'
|
||||||
import crudOperation from '@crud/CRUD.operation.vue'
|
import crudOperation from '@crud/CRUD.operation.vue'
|
||||||
|
|
@ -308,11 +419,13 @@ import {getBillTypes} from '@/api/billType'
|
||||||
import crudAsn from '@/api/asn'
|
import crudAsn from '@/api/asn'
|
||||||
import {queryBomAccountList} from '@/api/bomAccount'
|
import {queryBomAccountList} from '@/api/bomAccount'
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
|
import {addAsnDetail} from "@/api/xppRecord";
|
||||||
|
import crudStock from "@/api/stock"
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: null,
|
id: null,
|
||||||
asn: null,
|
asn: null,
|
||||||
|
asnId: null,
|
||||||
item: null,
|
item: null,
|
||||||
stock: null,
|
stock: null,
|
||||||
lineNo: null,
|
lineNo: null,
|
||||||
|
|
@ -367,9 +480,9 @@ export default {
|
||||||
sort: 'id,desc',
|
sort: 'id,desc',
|
||||||
crudMethod: {...crudAsnDetail},
|
crudMethod: {...crudAsnDetail},
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: true,
|
del: false,
|
||||||
reset: false,
|
reset: false,
|
||||||
download: false
|
download: false
|
||||||
}
|
}
|
||||||
|
|
@ -385,6 +498,8 @@ export default {
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
dialogInsertAsn: false,
|
dialogInsertAsn: false,
|
||||||
|
dialogInsertAsnDetail: false,
|
||||||
|
zlDialogVisible: false,
|
||||||
isResizing: false,
|
isResizing: false,
|
||||||
initialWidth: 0,
|
initialWidth: 0,
|
||||||
initialHeight: 0,
|
initialHeight: 0,
|
||||||
|
|
@ -406,9 +521,6 @@ export default {
|
||||||
}],
|
}],
|
||||||
billType: [{
|
billType: [{
|
||||||
required: true, message: '单据类型不能为空', trigger: 'blur'
|
required: true, message: '单据类型不能为空', trigger: 'blur'
|
||||||
}],
|
|
||||||
code: [{
|
|
||||||
required: true, message: '凭证号不能为空', trigger: 'blur'
|
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
asnDetailRules: {
|
asnDetailRules: {
|
||||||
|
|
@ -417,11 +529,21 @@ export default {
|
||||||
],
|
],
|
||||||
orderQty: [
|
orderQty: [
|
||||||
{required: true, message: '订单数量不能为空', trigger: 'blur'}
|
{required: true, message: '订单数量不能为空', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
propC1: [
|
||||||
|
{required: true, message: '批次号不能为空', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
propC2: [
|
||||||
|
{required: true, message: '序列号不能为空', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
propD1: [
|
||||||
|
{required: true, message: '生成日期不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
// point: [
|
// point: [
|
||||||
// { required: true, message: '库位不能为空', trigger: 'blur' }
|
// { required: true, message: '库位不能为空', trigger: 'blur' }
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
|
zlRules: {},
|
||||||
//下拉物料
|
//下拉物料
|
||||||
itemOptions: [],
|
itemOptions: [],
|
||||||
//下拉点位
|
//下拉点位
|
||||||
|
|
@ -431,6 +553,7 @@ export default {
|
||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
//下拉类型
|
//下拉类型
|
||||||
billTypeOptions: [],
|
billTypeOptions: [],
|
||||||
|
stockOptions:[],
|
||||||
// 新增主表
|
// 新增主表
|
||||||
asnFrom: {
|
asnFrom: {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
@ -477,8 +600,17 @@ export default {
|
||||||
logining2: false,
|
logining2: false,
|
||||||
logining3: false,
|
logining3: false,
|
||||||
pointTF: false,
|
pointTF: false,
|
||||||
viewPropC1: false,
|
isBatch: false,
|
||||||
viewPropC2: false,
|
isSerial: false,
|
||||||
|
isValidPeriod: false,
|
||||||
|
zlForm: {
|
||||||
|
item: {},
|
||||||
|
asn: {},
|
||||||
|
orderQty: 0,
|
||||||
|
area: {},
|
||||||
|
loc:{},
|
||||||
|
receivedQty:0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// beforeDestroy() { //页面关闭时清除定时器
|
// beforeDestroy() { //页面关闭时清除定时器
|
||||||
|
|
@ -499,12 +631,14 @@ export default {
|
||||||
// this.setTime();
|
// this.setTime();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
addAsnDetail,
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
this.asnTF()
|
this.asnTF()
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
queryAsnDetail(ansId) {
|
queryAsnDetail(ansId) {
|
||||||
|
this.form.asnId = ansId
|
||||||
this.asnFrom.id = ansId
|
this.asnFrom.id = ansId
|
||||||
this.crud.query = {asnId: ansId}
|
this.crud.query = {asnId: ansId}
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|
@ -521,6 +655,11 @@ export default {
|
||||||
// 执行关闭操作
|
// 执行关闭操作
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
|
queryStock(){
|
||||||
|
crudStock.queryKyStockList({}).then(res => {
|
||||||
|
this.stockOptions = res
|
||||||
|
})
|
||||||
|
},
|
||||||
setTime() { //设置定时器
|
setTime() { //设置定时器
|
||||||
// this.clearTimeSet=setInterval(() => {
|
// this.clearTimeSet=setInterval(() => {
|
||||||
// this.asnTF();
|
// this.asnTF();
|
||||||
|
|
@ -540,41 +679,15 @@ export default {
|
||||||
getPointList(itObj, code, data) {
|
getPointList(itObj, code, data) {
|
||||||
console.log(itObj)
|
console.log(itObj)
|
||||||
if (itObj != null) {
|
if (itObj != null) {
|
||||||
this.viewPropC1 = itObj.bepc;
|
this.isBatch = itObj.isBatch;
|
||||||
this.viewPropC2 = itObj.bexq;
|
this.isSerial = itObj.isSerial;
|
||||||
}
|
this.isValidPeriod = itObj.isValidPeriod
|
||||||
if (data.area.bexb) {
|
|
||||||
this.pointTF = true;
|
|
||||||
let selectDate = {rAreaCode: null, itemCode: null}
|
|
||||||
selectDate.rAreaCode = data.area.code
|
|
||||||
selectDate.itemCode = code
|
|
||||||
// if (selectDate.rAreaCode === null) {
|
|
||||||
// if (selectDate.rAreaCode === null) {
|
|
||||||
// this.$message.error('主表未绑定库区')
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
queryBomAccountList(selectDate).then(res => {
|
|
||||||
this.pointOptions = []
|
|
||||||
if (res != null) {
|
|
||||||
console.log(res)
|
|
||||||
let data_ = []
|
|
||||||
for (const re of res) {
|
|
||||||
data_.push(re.zPoint)
|
|
||||||
}
|
|
||||||
this.pointOptions = this.filterListObj(data_)
|
|
||||||
}
|
|
||||||
if (!(this.pointOptions.length > 0)) {
|
|
||||||
queryPointList({code: 'ZZKW'}).then(re => {
|
|
||||||
this.pointOptions = re
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.pointTF = false;
|
|
||||||
queryPointList({type: 'CH'}).then(re => {
|
|
||||||
this.pointOptions = re
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queryPointList({}).then(res => {
|
||||||
|
this.pointOptions = res
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
//过滤重复数据
|
//过滤重复数据
|
||||||
|
|
@ -650,9 +763,8 @@ export default {
|
||||||
this.asnId = res.id
|
this.asnId = res.id
|
||||||
//加载数据
|
//加载数据
|
||||||
this.asnTF()
|
this.asnTF()
|
||||||
this.$message.success('添加成功')
|
this.crud.notify('添加成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
//this.$router.push({path: '/business-asn/viewAsnDetail', query: {ids: res.id}})
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
|
@ -743,6 +855,60 @@ export default {
|
||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
},
|
||||||
|
insertAsnDetail() {
|
||||||
|
this.dialogInsertAsnDetail = true;
|
||||||
|
},
|
||||||
|
handleAsnDetailClose(done) {
|
||||||
|
this.form = {};
|
||||||
|
this.isBatch = false,
|
||||||
|
this.isSerial = false,
|
||||||
|
this.isValidPeriod = false
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
asnDetailConf() {
|
||||||
|
if (this.asnFrom.id == null || this.asnFrom.id <= 0) {
|
||||||
|
this.crud.notify('请先提交入库单', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
}
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
crudAsn.getIdByAsn(this.asnFrom.id).then(res => {
|
||||||
|
this.form.asn = res;
|
||||||
|
crudAsnDetail.add(this.form).then(res => {
|
||||||
|
this.crud.notify('添加成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.dialogInsertAsnDetail = false;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
asnDetailCel() {
|
||||||
|
this.form = {};
|
||||||
|
this.isBatch = false,
|
||||||
|
this.isSerial = false,
|
||||||
|
this.isValidPeriod = false
|
||||||
|
this.dialogInsertAsnDetail = false;
|
||||||
|
},
|
||||||
|
toEditAsnDetail(data) {
|
||||||
|
this.form = data;
|
||||||
|
this.dialogInsertAsnDetail = true;
|
||||||
|
},
|
||||||
|
asnDetailZl(datas) {
|
||||||
|
this.zlForm = datas[0];
|
||||||
|
this.zlDialogVisible = true;
|
||||||
|
},
|
||||||
|
zhengli() {
|
||||||
|
|
||||||
|
},
|
||||||
|
zhengliCel() {
|
||||||
|
this.zlDialogVisible = false;
|
||||||
|
},
|
||||||
|
handleZlClose(done) {
|
||||||
|
done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue