no message
parent
733ba7b15c
commit
4d6cfa8f18
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="crud-opts">
|
<div class="crud-opts">
|
||||||
<span class="crud-opts-left">
|
<span class="crud-opts-left">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left"/>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="crud.optShow.add"
|
v-if="crud.optShow.add"
|
||||||
v-permission="permission.add"
|
v-permission="permission.add"
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
@click="crud.doExport"
|
@click="crud.doExport"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
<!--右侧-->
|
<!--右侧-->
|
||||||
<slot name="right" />
|
<slot name="right"/>
|
||||||
</span>
|
</span>
|
||||||
<el-button-group class="crud-opts-right">
|
<el-button-group class="crud-opts-right">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, {crud} from '@crud/crud'
|
||||||
import crudTableConfig from '@/api/tableConfig'
|
import crudTableConfig from '@/api/tableConfig'
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
|
|
||||||
|
|
@ -130,22 +130,28 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
permission: {
|
permission: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { return {} }
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ignoreColumns: {
|
ignoreColumns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => { return [] }
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tableKey: {
|
tableKey: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => { return '' }
|
default: () => {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
hiddenColumns:[],
|
hiddenColumns: [],
|
||||||
table_configs:[],
|
table_configs: [],
|
||||||
table_configs_xs:[],
|
table_configs_xs: [],
|
||||||
tableColumns: [],
|
tableColumns: [],
|
||||||
allColumnsSelected: true,
|
allColumnsSelected: true,
|
||||||
allColumnsSelectedIndeterminate: false,
|
allColumnsSelectedIndeterminate: false,
|
||||||
|
|
@ -183,51 +189,57 @@ export default {
|
||||||
|
|
||||||
initcolumn() {
|
initcolumn() {
|
||||||
this.updateTableColumns()
|
this.updateTableColumns()
|
||||||
const strHidden=sessionStorage.getItem(this.tableKey)
|
const strHidden = sessionStorage.getItem(this.tableKey)
|
||||||
this.hiddenColumns= JSON.parse(strHidden);
|
this.hiddenColumns = JSON.parse(strHidden);
|
||||||
if(this.hiddenColumns.length>0){
|
if (this.hiddenColumns) {
|
||||||
console.log("------移除---------------")
|
|
||||||
const table = this.crud.props.table
|
const table = this.crud.props.table
|
||||||
this.table_configs_xs.forEach((column,index) => {
|
if (table) { // 添加检查
|
||||||
const vm = table.$children.find(e => e.label === column.label)
|
this.table_configs_xs.forEach((column, index) => {
|
||||||
|
const vm = table.$children.find(e => e.label === column.label)
|
||||||
const columnConfig = vm.columnConfig
|
if (vm) { // 再次检查
|
||||||
|
const columnConfig = vm.columnConfig
|
||||||
|
vm.owner.store.commit('removeColumn', columnConfig, null)
|
||||||
console.log(columnConfig)
|
}
|
||||||
vm.owner.store.commit('removeColumn', columnConfig, null)
|
})
|
||||||
|
}
|
||||||
})
|
|
||||||
this.ignoreNextTableColumnsChange = false
|
this.ignoreNextTableColumnsChange = false
|
||||||
console.log("--------移除完成-------------")
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 方法区
|
// 方法区
|
||||||
this.showcolumn();
|
this.showcolumn();
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
//vm.owner.store.commit('insertColumn', columnConfig, newIndex+myindex + 1 , null)
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
showcolumn() {
|
showcolumn() {
|
||||||
console.log("------显示列------")
|
try {
|
||||||
const strHidden=sessionStorage.getItem(this.tableKey)
|
// 从sessionStorage安全地获取并解析hiddenColumns
|
||||||
this.hiddenColumns= JSON.parse(strHidden);
|
const strHidden = sessionStorage.getItem(this.tableKey)
|
||||||
const table = this.crud.props.table
|
if (strHidden) {
|
||||||
this.hiddenColumns.forEach((column,index) => {
|
this.hiddenColumns = JSON.parse(strHidden);
|
||||||
|
} else {
|
||||||
const vm = table.$children.find(e => e.prop === column.property)
|
// 如果没有找到相应的存储信息,可以初始化为空数组或相应的默认值
|
||||||
const columnConfig = vm.columnConfig
|
this.hiddenColumns = [];
|
||||||
console.log(columnConfig.label)
|
|
||||||
if(column.visible){
|
|
||||||
columnConfig.width=column.width
|
|
||||||
columnConfig.visible=column.visible
|
|
||||||
vm.owner.store.commit('insertColumn', columnConfig, index+1 , null)
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
console.log("------显示列完成------")
|
const table = this.crud.props.table
|
||||||
this. updateTableColumns();
|
// 优化循环中的条件判断和错误处理
|
||||||
|
this.hiddenColumns.forEach((column, index) => {
|
||||||
|
const vm = table.$children.find(e => e && e.prop === column.property)
|
||||||
|
if (vm) {
|
||||||
|
const columnConfig = vm.columnConfig;
|
||||||
|
// 确保columnConfig存在
|
||||||
|
if (columnConfig) {
|
||||||
|
if (column.visible) {
|
||||||
|
// 仅当列需要显示时,才更新其配置
|
||||||
|
columnConfig.width = column.width;
|
||||||
|
columnConfig.visible = column.visible;
|
||||||
|
vm.owner.store.commit('insertColumn', columnConfig, index + 1, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.updateTableColumns();
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//列拖拽
|
//列拖拽
|
||||||
columnDrop() {
|
columnDrop() {
|
||||||
|
|
@ -237,51 +249,51 @@ export default {
|
||||||
delay: 0,
|
delay: 0,
|
||||||
onEnd: evt => {
|
onEnd: evt => {
|
||||||
// 根据中文label进行拖拉
|
// 根据中文label进行拖拉
|
||||||
this.ColumnsDrop(evt.item.innerText,evt.newIndex)
|
this.ColumnsDrop(evt.item.innerText, evt.newIndex)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//新加方法
|
//新加方法
|
||||||
ColumnsDrop(oldText,newIndex) {
|
ColumnsDrop(oldText, newIndex) {
|
||||||
const table = this.crud.props.table
|
const table = this.crud.props.table
|
||||||
let myindex = -1 //空格
|
let myindex = -1 //空格
|
||||||
let oldIndex1 = 0
|
let oldIndex1 = 0
|
||||||
let step = -1
|
let step = -1
|
||||||
let count = 0
|
let count = 0
|
||||||
//
|
//
|
||||||
this.tableColumns.some((column,index) => {
|
this.tableColumns.some((column, index) => {
|
||||||
if(column.visible) {
|
if (column.visible) {
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 定位拖拉中文表头位置以及在该字段之前隐藏字段数量
|
// 定位拖拉中文表头位置以及在该字段之前隐藏字段数量
|
||||||
this.tableColumns.some((column,index) => {
|
this.tableColumns.some((column, index) => {
|
||||||
if(column.label === oldText) {
|
if (column.label === oldText) {
|
||||||
oldIndex1 = index
|
oldIndex1 = index
|
||||||
return true
|
return true
|
||||||
}else{
|
} else {
|
||||||
// 空格在字段前面
|
// 空格在字段前面
|
||||||
if(step>index){
|
if (step > index) {
|
||||||
myindex++
|
myindex++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
step++
|
step++
|
||||||
})
|
})
|
||||||
if (myindex === -1 ) {
|
if (myindex === -1) {
|
||||||
myindex = 0
|
myindex = 0
|
||||||
}
|
}
|
||||||
let item= this.tableColumns[oldIndex1]
|
let item = this.tableColumns[oldIndex1]
|
||||||
const vm = table.$children.find(e => e.prop === item.property)
|
const vm = table.$children.find(e => e.prop === item.property)
|
||||||
const columnConfig = vm.columnConfig
|
const columnConfig = vm.columnConfig
|
||||||
/*this.tableColumns.splice(oldIndex1-1, 1)
|
/*this.tableColumns.splice(oldIndex1-1, 1)
|
||||||
this.tableColumns.splice(myindex-1, 0, item)*/
|
this.tableColumns.splice(myindex-1, 0, item)*/
|
||||||
if(oldIndex1 <newIndex){ // 从左至右拖动
|
if (oldIndex1 < newIndex) { // 从左至右拖动
|
||||||
vm.owner.store.commit('insertColumn', columnConfig, newIndex+myindex , null)
|
vm.owner.store.commit('insertColumn', columnConfig, newIndex + myindex, null)
|
||||||
vm.owner.store.commit('removeColumn', columnConfig, null)
|
vm.owner.store.commit('removeColumn', columnConfig, null)
|
||||||
}else { //从右至左拖动
|
} else { //从右至左拖动
|
||||||
vm.owner.store.commit('removeColumn', columnConfig, null)
|
vm.owner.store.commit('removeColumn', columnConfig, null)
|
||||||
vm.owner.store.commit('insertColumn', columnConfig, newIndex+myindex , null)
|
vm.owner.store.commit('insertColumn', columnConfig, newIndex + myindex, null)
|
||||||
}
|
}
|
||||||
// 列重新排序
|
// 列重新排序
|
||||||
this.ignoreNextTableColumnsChange = false
|
this.ignoreNextTableColumnsChange = false
|
||||||
|
|
@ -352,7 +364,7 @@ export default {
|
||||||
})
|
})
|
||||||
if (selectedCount === 0) {
|
if (selectedCount === 0) {
|
||||||
this.crud.notify('请至少选择一列', CRUD.NOTIFICATION_TYPE.WARNING)
|
this.crud.notify('请至少选择一列', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function () {
|
||||||
item.visible = true
|
item.visible = true
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
@ -375,8 +387,8 @@ export default {
|
||||||
crudTableConfig.add(post_table_config)*/
|
crudTableConfig.add(post_table_config)*/
|
||||||
//this.postToTableConfig();
|
//this.postToTableConfig();
|
||||||
},
|
},
|
||||||
postToTableConfig(){
|
postToTableConfig() {
|
||||||
this. updateTableColumns();
|
this.updateTableColumns();
|
||||||
const columns = []
|
const columns = []
|
||||||
this.tableColumns.forEach(column => {
|
this.tableColumns.forEach(column => {
|
||||||
const table_config = {
|
const table_config = {
|
||||||
|
|
@ -392,11 +404,11 @@ export default {
|
||||||
tableType: this.tableKey
|
tableType: this.tableKey
|
||||||
}
|
}
|
||||||
|
|
||||||
this.crud.loading=true
|
this.crud.loading = true
|
||||||
crudTableConfig.add(post_table_config).then(res => {
|
crudTableConfig.add(post_table_config).then(res => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 方法区
|
// 方法区
|
||||||
this.crud.loading=false
|
this.crud.loading = false
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
@ -411,7 +423,7 @@ export default {
|
||||||
if (item.visible) {
|
if (item.visible) {
|
||||||
// 找出合适的插入点
|
// 找出合适的插入点
|
||||||
const columnIndex = this.tableColumns.indexOf(item)
|
const columnIndex = this.tableColumns.indexOf(item)
|
||||||
vm.owner.store.commit('insertColumn', columnConfig, columnIndex+1, null)
|
vm.owner.store.commit('insertColumn', columnConfig, columnIndex + 1, null)
|
||||||
} else {
|
} else {
|
||||||
vm.owner.store.commit('removeColumn', columnConfig, null)
|
vm.owner.store.commit('removeColumn', columnConfig, null)
|
||||||
}
|
}
|
||||||
|
|
@ -431,9 +443,11 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.crud-opts .crud-opts-right {
|
.crud-opts .crud-opts-right {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.crud-opts .crud-opts-right span {
|
.crud-opts .crud-opts-right span {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,6 @@ function CRUD(options) {
|
||||||
}
|
}
|
||||||
crud.page.total = data.totalElements
|
crud.page.total = data.totalElements
|
||||||
crud.data = data.content
|
crud.data = data.content
|
||||||
crud.tableHeight = window.innerHeight -table.$el.offsetTop - 60;
|
|
||||||
crud.resetDataStatus()
|
crud.resetDataStatus()
|
||||||
// time 毫秒后显示表格
|
// time 毫秒后显示表格
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,8 @@
|
||||||
<!-- 明细-->
|
<!-- 明细-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
|
|
||||||
|
|
||||||
<!--自己定义新增表单组件-->
|
<!--自己定义新增表单组件-->
|
||||||
<el-dialog :visible.sync="inserAsnOnOff" :title="(this.updateAsnOnOff ? '修改 ':'新增 ')+'收货管理'" width="900px"
|
<el-dialog :visible.sync="inserAsnOnOff" :title="(this.updateAsnOnOff ? '修改 ':'新增 ')+'收货管理'" width="900px"
|
||||||
>
|
>
|
||||||
|
|
@ -214,6 +216,7 @@
|
||||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<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
|
||||||
|
|
@ -271,6 +274,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<viewAsnDetail ref="viewAsnDetail" />
|
||||||
|
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<pagination/>
|
<pagination/>
|
||||||
|
|
@ -294,6 +299,7 @@ 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"
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
@ -325,7 +331,7 @@ const defaultForm = {
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Asn',
|
name: 'Asn',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation,DateRangePicker },
|
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() {
|
||||||
|
|
@ -481,24 +487,9 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//新政的开关
|
//新政的开关
|
||||||
inserAsnOnOffM(data) {
|
inserAsnOnOffM() {
|
||||||
this.$router.push({path:'/business-asn/viewAsnDetail'})
|
this.$refs.viewAsnDetail.dialogInsertAsn=true
|
||||||
// this.inserAsnOnOff = true
|
//this.$router.push({path:'/business-asn/viewAsnDetail'})
|
||||||
// let no = null
|
|
||||||
// for (const billTypDateElement of this.billTypeOptions) {
|
|
||||||
// if (billTypDateElement.code === data) {
|
|
||||||
// this.asnFrom.billType = billTypDateElement
|
|
||||||
// no = billTypDateElement.code
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (this.asnFrom.billType === null) {
|
|
||||||
// this.$message.error('billType 没有加载 或没有ZC_CK数据')
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// getCodeNo(no).then(res => {
|
|
||||||
// this.asnFrom.code = res
|
|
||||||
// })
|
|
||||||
// this.asnFrom.orderDate = this.getNewDate()
|
|
||||||
},
|
},
|
||||||
//获取当前时间
|
//获取当前时间
|
||||||
getNewDate() {
|
getNewDate() {
|
||||||
|
|
@ -544,7 +535,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
asnDetailRouter(datas){
|
asnDetailRouter(datas){
|
||||||
this.$router.push({path:'/business-asn/viewAsnDetail',query: {ids:datas.id}})
|
this.$refs.viewAsnDetail.dialogInsertAsn=true
|
||||||
|
this.$refs.viewAsnDetail.asnFrom=datas
|
||||||
|
this.$refs.viewAsnDetail.queryAsnDetail(datas.id)
|
||||||
|
//this.$router.push({path:'/business-asn/viewAsnDetail',query: {ids:datas.id}})
|
||||||
},
|
},
|
||||||
//入库批量确认
|
//入库批量确认
|
||||||
invVerifyS(data){
|
invVerifyS(data){
|
||||||
|
|
|
||||||
|
|
@ -1,305 +1,314 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<!-- 卡片头 -->
|
|
||||||
<div style="width: 100%;height: 180px;position: relative;">
|
|
||||||
<el-form ref="asnFromRes" :model="asnFrom" :rules="rules" size="small" label-width="80px">
|
|
||||||
<div style="width: 60%;height: 180px;float: left">
|
|
||||||
<el-form-item label="库区" prop="area">
|
|
||||||
<el-select v-model="asnFrom.area" prop="area" value-key="id" style="width: 100%"
|
|
||||||
placeholder="请选择出库库区" clearable
|
|
||||||
>
|
|
||||||
<el-option v-for="item in areaOptions" :key="item.id" :label="item.code" :value="item"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<div style="width: 100%;position: relative;height: 45px;">
|
|
||||||
<div style="width: 50%;float: left">
|
|
||||||
<el-form-item label="单据类型" prop="billType">
|
|
||||||
<el-select v-model="asnFrom.billType" value-key="id" style="width:100%"
|
|
||||||
placeholder="请选择单据类型" clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in billTypeOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<div style="width: 50%;float: right">
|
|
||||||
<el-form-item label="订单日期" prop="orderDate">
|
|
||||||
<el-date-picker
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="asnFrom.orderDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择日期"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 100%;position: relative;height: 45px;">
|
|
||||||
<div style="width: 50%;float: left">
|
|
||||||
<el-form-item label="单号" prop="code">
|
|
||||||
<el-input :disabled="true" v-model="asnFrom.code" style="width: 100%"/>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<div style="width: 50%;float: right">
|
|
||||||
<el-form-item label="订单数量">
|
|
||||||
<el-input :disabled="true" v-model="asnFrom.orderQuantity" style="width: 100%;"/>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 100%;position: relative;">
|
|
||||||
<div style="width: 50%;float: left">
|
|
||||||
<el-button type="primary" :disabled="asnFrom.code != null" @click="submitFromAsn(asnFrom)">提交
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<!-- 卡片头 -->
|
||||||
<div style="width: 40%;height: 180px;float: right">
|
<el-dialog :visible.sync="dialogInsertAsn"
|
||||||
<el-form-item label="备注:">
|
center
|
||||||
|
top="0.5vh"
|
||||||
|
:fullscreen="fullscreen"
|
||||||
|
width="80%"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
|
||||||
</el-form-item>
|
<template #title>
|
||||||
<el-input v-model="asnFrom.description" type="textarea" :autosize="{ minRows: 5, maxRows: 8}"
|
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||||
placeholder="请输入备注" style="width: 90%;height: 100%;float: right"
|
<span style="flex: 1; text-align: center;">新增入库单</span>
|
||||||
/>
|
<div>
|
||||||
</div>
|
<i class="el-icon-full-screen" @click="fullscreen = !fullscreen"
|
||||||
</el-form>
|
style="cursor: pointer; margin-right: 20px;font-size: 13px;"></i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<el-form ref="asnFromRes" :model="asnFrom" :rules="rules" size="small" label-width="80px">
|
||||||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
<el-row>
|
||||||
<el-button
|
<el-col :span="12">
|
||||||
slot="right"
|
<el-form-item label="单据类型" prop="billType">
|
||||||
class="filter-item"
|
<el-select v-model="asnFrom.billType" value-key="id"
|
||||||
type="primary"
|
placeholder="请选择单据类型" clearable style="width: 100%"
|
||||||
size="mini"
|
>
|
||||||
@click="rkAndQxButtonM(1)"
|
<el-option
|
||||||
:loading="logining1"
|
v-for="item in billTypeOptions"
|
||||||
>
|
:key="item.id"
|
||||||
整单入库
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订单日期" prop="orderDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="asnFrom.orderDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="凭证号" prop="code">
|
||||||
|
<el-input v-model="asnFrom.code"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订单数量">
|
||||||
|
<el-input :disabled="true" v-model.number="asnFrom.orderQuantity"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="备注:">
|
||||||
|
<el-input v-model="asnFrom.description" type="textarea" :autosize="{ minRows: 3, maxRows: 5}"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" size="small" @click="submitFromAsn(asnFrom)">提交
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
</el-form>
|
||||||
slot="right"
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
class="filter-item"
|
<el-tab-pane label="订单明细信息" name="first">
|
||||||
type="primary"
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
size="mini"
|
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||||
:disabled="!(crud.selections.length === 1)"
|
<el-button
|
||||||
@click="dyrkM(crud.selections)"
|
slot="right"
|
||||||
:loading="logining2"
|
class="filter-item"
|
||||||
>
|
type="primary"
|
||||||
单一入库
|
size="mini"
|
||||||
</el-button>
|
@click="rkAndQxButtonM(1)"
|
||||||
<el-button
|
:loading="logining1"
|
||||||
slot="right"
|
>
|
||||||
class="filter-item"
|
整单入库
|
||||||
type="primary"
|
</el-button>
|
||||||
size="mini"
|
<el-button
|
||||||
:disabled="crud.selections.length === 0"
|
slot="right"
|
||||||
@click="qxshM(crud.selections)"
|
class="filter-item"
|
||||||
:loading="logining3"
|
type="primary"
|
||||||
>
|
size="mini"
|
||||||
取消收货
|
:disabled="!(crud.selections.length === 1)"
|
||||||
</el-button>
|
@click="dyrkM(crud.selections)"
|
||||||
<el-upload
|
:loading="logining2"
|
||||||
class="upload-demo"
|
>
|
||||||
ref="upload"
|
单一入库
|
||||||
slot='right'
|
</el-button>
|
||||||
style="float: right;padding-left: 5px"
|
<el-button
|
||||||
:action="baseApi+'/api/importData/importAsnDetail?asnId='+this.asnId"
|
slot="right"
|
||||||
:file-list="fileList"
|
class="filter-item"
|
||||||
:on-success=handleSuccess
|
type="primary"
|
||||||
:on-error="handleError"
|
size="mini"
|
||||||
:headers="headers"
|
:disabled="crud.selections.length === 0"
|
||||||
:show-file-list="true">
|
@click="qxshM(crud.selections)"
|
||||||
<el-button size="mini" type="success" icon="el-icon-upload">导入</el-button>
|
:loading="logining3"
|
||||||
</el-upload>
|
>
|
||||||
</crudOperation>
|
取消收货
|
||||||
<!-- 单一入库 -->
|
</el-button>
|
||||||
<el-dialog title="单一入库" :visible.sync="dyrkTf" width="500px">
|
<el-upload
|
||||||
<!-- <el-dialog-->
|
class="upload-demo"
|
||||||
<!-- width="30%"-->
|
ref="upload"
|
||||||
<!-- title="内层 Dialog"-->
|
slot='right'
|
||||||
<!-- :visible.sync="innerVisible"-->
|
style="float: right;padding-left: 5px"
|
||||||
<!-- append-to-body>-->
|
:action="baseApi+'/api/importData/importAsnDetail?asnId='+this.asnId"
|
||||||
<!-- </el-dialog>-->
|
:file-list="fileList"
|
||||||
<el-form ref="formdyrk" :model="asnDetailButton" label-width="80px">
|
:on-success=handleSuccess
|
||||||
<el-form-item label="数量" prop="oneRNumber" :rules="[
|
:on-error="handleError"
|
||||||
|
:headers="headers"
|
||||||
|
:show-file-list="true">
|
||||||
|
<el-button size="mini" type="success" icon="el-icon-upload">导入</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
||||||
|
@selection-change="crud.selectionChangeHandler" height="35vh"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55"/>
|
||||||
|
<el-table-column prop="item.code " label="品番号" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.item == null ? '' : scope.row.item.code }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="item.name" label="品番" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.item == null ? '' : scope.row.item.name }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="item.unit" label="单位">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.item == null ? '' : scope.row.item.unit }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="orderQty" label="订单数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row == null ? '' : scope.row.orderQty }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="receivedQty" label="收货数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row == null ? '' : scope.row.receivedQty }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="point.code" label="库位">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.point == null ? '' : scope.row.point.code }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="propC1" label="批次号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.propC1 }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="propC2" label="序列号"/>
|
||||||
|
<el-table-column prop="propD1" label="生产日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.propD1 }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="remark" label="备注">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.remark }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="checkPer(['admin','asnDetail:edit','asnDetail:del'])" label="操作"
|
||||||
|
width="150px"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<div style="float: right">
|
||||||
|
<pagination/>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 单一入库 -->
|
||||||
|
<el-dialog title="单一入库" :visible.sync="dyrkTf" width="500px">
|
||||||
|
<!-- <el-dialog-->
|
||||||
|
<!-- width="30%"-->
|
||||||
|
<!-- title="内层 Dialog"-->
|
||||||
|
<!-- :visible.sync="innerVisible"-->
|
||||||
|
<!-- append-to-body>-->
|
||||||
|
<!-- </el-dialog>-->
|
||||||
|
<el-form ref="formdyrk" :model="asnDetailButton" label-width="80px">
|
||||||
|
<el-form-item label="数量" prop="oneRNumber" :rules="[
|
||||||
{ required: true, message: '数量不能为空'},
|
{ required: true, message: '数量不能为空'},
|
||||||
{ type: 'number', message: '数量必须为数字值'}
|
{ type: 'number', message: '数量必须为数字值'}
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-input v-model.number="asnDetailButton.oneRNumber" placeholder="请输入数量" style="width: 250px"/>
|
<el-input v-model.number="asnDetailButton.oneRNumber" placeholder="请输入数量" style="width: 250px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库位" prop="oneRPoint" :rules="[
|
<el-form-item label="库位" prop="oneRPoint" :rules="[
|
||||||
{ required: true, message: '库位不能为空'}
|
{ required: true, message: '库位不能为空'}
|
||||||
]"
|
]"
|
||||||
|
>
|
||||||
|
<el-select v-model="asnDetailButton.oneRPoint" value-key="id" placeholder="请选择库位"
|
||||||
|
style="width: 250px">
|
||||||
|
<el-option
|
||||||
|
v-for="(item,index) in pointOptions"
|
||||||
|
:key="item.id+''+item.code"
|
||||||
|
:label="item.code"
|
||||||
|
:value="item"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dyrkTf = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="rkAndQxButtonM(2)">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||||
|
:title="crud.status.title" width="400px"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :rules="asnDetailRules" :model="form" size="small" label-width="80px"
|
||||||
|
style="height: 200px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="物料" prop="item" style="float: left">
|
||||||
|
<el-select v-model="form.item" value-key="id" filterable placeholder="请选择品番" style="width: 200px;"
|
||||||
|
@change="getPointList(form.item,$event.code,asn)"
|
||||||
|
clearable
|
||||||
>
|
>
|
||||||
<el-select v-model="asnDetailButton.oneRPoint" value-key="id" placeholder="请选择库位" style="width: 250px">
|
<el-option
|
||||||
<el-option
|
v-for="item in itemOptions"
|
||||||
v-for="(item,index) in pointOptions"
|
:key="item.id"
|
||||||
:key="item.id+''+item.code"
|
:label="item.code"
|
||||||
:label="item.code"
|
:value="item"
|
||||||
:value="item"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dyrkTf = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="rkAndQxButtonM(2)">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!--表单组件-->
|
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
|
||||||
:title="crud.status.title" width="400px"
|
|
||||||
>
|
|
||||||
<el-form ref="form" :rules="asnDetailRules" :model="form" size="small" label-width="80px"
|
|
||||||
style="height: 200px"
|
|
||||||
>
|
|
||||||
<el-form-item label="物料" prop="item" style="float: left">
|
|
||||||
<el-select v-model="form.item" value-key="id" filterable placeholder="请选择品番" style="width: 200px;"
|
|
||||||
@change="getPointList(form.item,$event.code,asn)"
|
|
||||||
clearable
|
|
||||||
>
|
>
|
||||||
<el-option
|
<span style="float: left">{{ item.code }}</span>
|
||||||
v-for="item in itemOptions"
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
||||||
:key="item.id"
|
</el-option>
|
||||||
:label="item.code"
|
</el-select>
|
||||||
:value="item"
|
</el-form-item>
|
||||||
>
|
<el-form-item label="订单数量" prop="orderQty" style="float: left">
|
||||||
<span style="float: left">{{ item.code }}</span>
|
<el-input v-model="form.orderQty" style="width: 200px;"/>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
</el-form-item>
|
||||||
</el-option>
|
<el-form-item v-if="pointTF" label="库位" prop="point" style="float: left">
|
||||||
</el-select>
|
<el-select v-model="form.point" value-key="id" filterable placeholder="请选择库位" clearable
|
||||||
</el-form-item>
|
style="width: 200px;"
|
||||||
<el-form-item label="订单数量" prop="orderQty" style="float: left">
|
>
|
||||||
<el-input v-model="form.orderQty" style="width: 200px;"/>
|
<el-option
|
||||||
</el-form-item>
|
v-for="item in pointOptions"
|
||||||
<el-form-item v-if="pointTF" label="库位" prop="point" style="float: left">
|
:key="item.id"
|
||||||
<el-select v-model="form.point" value-key="id" filterable placeholder="请选择库位" clearable
|
:label="item.code"
|
||||||
style="width: 200px;"
|
:value="item"
|
||||||
>
|
|
||||||
<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-form-item>
|
|
||||||
<el-form-item v-if="viewPropC2" label="序列号" prop="propC2" style="float: left">
|
|
||||||
<el-input v-model="form.propC2" style="width: 200px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark" style="float: left">
|
|
||||||
<el-input type="textarea" :rows="2" v-model="form.remark" style="width: 200px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
||||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
|
|
||||||
@selection-change="crud.selectionChangeHandler" :height="crud.tableHeight"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55"/>
|
|
||||||
<el-table-column prop="item.code " label="品番号" width="100px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.item == null ? '' : scope.row.item.code }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="item.name" label="品番" width="100px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.item == null ? '' : scope.row.item.name }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="item.unit" label="单位">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.item == null ? '' : scope.row.item.unit }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="orderQty" label="订单数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row == null ? '' : scope.row.orderQty }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="receivedQty" label="收货数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row == null ? '' : scope.row.receivedQty }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="point.code" label="库位">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.point == null ? '' : scope.row.point.code }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="propC1" label="批次号">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.propC1 }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="propC2" label="序列号"/>
|
|
||||||
<el-table-column prop="propD1" label="生产日期">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.propD1 }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="remark" label="备注">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>{{ scope.row.remark }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="checkPer(['admin','asnDetail:edit','asnDetail:del'])" label="操作" width="150px"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<udOperation
|
|
||||||
:data="scope.row"
|
|
||||||
:permission="permission"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</el-select>
|
||||||
</el-table-column>
|
</el-form-item>
|
||||||
</el-table>
|
<el-form-item v-if="viewPropC1" label="批次号" prop="propC1" style="float: left">
|
||||||
<!--分页组件-->
|
<el-input v-model="form.propC1" style="width: 200px;"/>
|
||||||
<pagination/>
|
</el-form-item>
|
||||||
</el-card>
|
<el-form-item v-if="viewPropC2" label="序列号" prop="propC2" style="float: left">
|
||||||
|
<el-input v-model="form.propC2" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="备注" prop="remark" style="float: left">
|
||||||
|
<el-input type="textarea" :rows="2" v-model="form.remark" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudAsnDetail, { rkAndQxButton } from '@/api/asnDetail'
|
import crudAsnDetail, {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'
|
||||||
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 { queryItemAll } from '@/api/item'
|
import {queryItemAll} from '@/api/item'
|
||||||
import Search from '@/views/monitor/log/search.vue'
|
import Search from '@/views/monitor/log/search.vue'
|
||||||
import AsnTask from '@/views/business-asn/asnDetail/viewAsnTask.vue'
|
import AsnTask from '@/views/business-asn/asnDetail/viewAsnTask.vue'
|
||||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||||
import { getToken } from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
import { queryPointList } from '@/api/point'
|
import {queryPointList} from '@/api/point'
|
||||||
import { getIdByAsn } from '@/api/asn'
|
import {getIdByAsn} from '@/api/asn'
|
||||||
import {getAreas, queryAreaList} from '@/api/area'
|
import {getAreas, queryAreaList} from '@/api/area'
|
||||||
import { getBillTypes} from '@/api/billType'
|
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";
|
||||||
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: null,
|
id: null,
|
||||||
asn: null,
|
asn: null,
|
||||||
|
|
@ -337,7 +346,15 @@ const asnQuery = {
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'viewAsnDetail',
|
name: 'viewAsnDetail',
|
||||||
components: { DateRangePicker, AsnTask, Search, pagination, crudOperation, rrOperation, udOperation },
|
components: {
|
||||||
|
DateRangePicker,
|
||||||
|
AsnTask,
|
||||||
|
Search,
|
||||||
|
pagination,
|
||||||
|
crudOperation,
|
||||||
|
rrOperation,
|
||||||
|
udOperation
|
||||||
|
},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
dicts: ['asn_status'],
|
dicts: ['asn_status'],
|
||||||
cruds() {
|
cruds() {
|
||||||
|
|
@ -345,9 +362,9 @@ export default {
|
||||||
title: '收货数据',
|
title: '收货数据',
|
||||||
url: 'api/asnDetail',
|
url: 'api/asnDetail',
|
||||||
idField: 'id',
|
idField: 'id',
|
||||||
query: { asnId: 0 },
|
query: {asnId: this.asnFrom == null ? 0 : this.asnFrom.id},
|
||||||
sort: 'id,desc',
|
sort: 'id,desc',
|
||||||
crudMethod: { ...crudAsnDetail },
|
crudMethod: {...crudAsnDetail},
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: true,
|
||||||
edit: false,
|
edit: false,
|
||||||
|
|
@ -357,19 +374,6 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
//判断是否有数据
|
|
||||||
this.crud.query = asnQuery
|
|
||||||
let ids = this.$route.query.ids
|
|
||||||
if (ids != null) {
|
|
||||||
this.crud.query.asnId = ids
|
|
||||||
this.asnId = ids
|
|
||||||
} else {
|
|
||||||
this.crud.query.asnId = 0
|
|
||||||
this.asnId = 0
|
|
||||||
}
|
|
||||||
this.crud.refresh()
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'baseApi'
|
'baseApi'
|
||||||
|
|
@ -377,8 +381,16 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList:[],
|
fullscreen: false,
|
||||||
headers: { 'Authorization': getToken() },
|
activeName: 'first',
|
||||||
|
dialogInsertAsn: false,
|
||||||
|
isResizing: false,
|
||||||
|
initialWidth: 0,
|
||||||
|
initialHeight: 0,
|
||||||
|
initialX: 0,
|
||||||
|
initialY: 0,
|
||||||
|
fileList: [],
|
||||||
|
headers: {'Authorization': getToken()},
|
||||||
permission: {
|
permission: {
|
||||||
add: ['admin', 'asnDetail:add'],
|
add: ['admin', 'asnDetail:add'],
|
||||||
edit: ['admin', 'asnDetail:edit'],
|
edit: ['admin', 'asnDetail:edit'],
|
||||||
|
|
@ -386,21 +398,24 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
area: [
|
area: [
|
||||||
{ required: true, message: '出库库区不能为空', trigger: 'blur' }
|
{required: true, message: '出库库区不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
orderDate: [{
|
orderDate: [{
|
||||||
required: true, message: '订单日期不能为空', trigger: 'blur'
|
required: true, message: '订单日期不能为空', trigger: 'blur'
|
||||||
}],
|
}],
|
||||||
billType: [{
|
billType: [{
|
||||||
required: true, message: '单据类型不能为空', trigger: 'blur'
|
required: true, message: '单据类型不能为空', trigger: 'blur'
|
||||||
|
}],
|
||||||
|
code: [{
|
||||||
|
required: true, message: '凭证号不能为空', trigger: 'blur'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
asnDetailRules: {
|
asnDetailRules: {
|
||||||
item: [
|
item: [
|
||||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
{required: true, message: '物料不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
orderQty: [
|
orderQty: [
|
||||||
{ required: true, message: '订单数量不能为空', trigger: 'blur' }
|
{required: true, message: '订单数量不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
// point: [
|
// point: [
|
||||||
// { required: true, message: '库位不能为空', trigger: 'blur' }
|
// { required: true, message: '库位不能为空', trigger: 'blur' }
|
||||||
|
|
@ -444,7 +459,7 @@ export default {
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
},
|
},
|
||||||
detailId:0,
|
detailId: 0,
|
||||||
//主id
|
//主id
|
||||||
asnId: 0,
|
asnId: 0,
|
||||||
asn: {},
|
asn: {},
|
||||||
|
|
@ -460,15 +475,16 @@ export default {
|
||||||
logining1: false,
|
logining1: false,
|
||||||
logining2: false,
|
logining2: false,
|
||||||
logining3: false,
|
logining3: false,
|
||||||
pointTF:false,
|
pointTF: false,
|
||||||
viewPropC1:false,
|
viewPropC1: false,
|
||||||
viewPropC2:false,
|
viewPropC2: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// beforeDestroy() { //页面关闭时清除定时器
|
// beforeDestroy() { //页面关闭时清除定时器
|
||||||
// clearInterval(this.clearTimeSet);
|
// clearInterval(this.clearTimeSet);
|
||||||
// },
|
// },
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
//查询公用的下拉数据
|
//查询公用的下拉数据
|
||||||
this.getOnceOptionAll()
|
this.getOnceOptionAll()
|
||||||
//判断是否是新增主表和是查看明细新政附表
|
//判断是否是新增主表和是查看明细新政附表
|
||||||
|
|
@ -487,6 +503,23 @@ export default {
|
||||||
this.asnTF()
|
this.asnTF()
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
queryAsnDetail(ansId) {
|
||||||
|
this.asnFrom.id = ansId
|
||||||
|
this.crud.query = {asnId: ansId}
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
handleClick(tab, event) {
|
||||||
|
},
|
||||||
|
handleClose(done) {
|
||||||
|
// 清空表单数据
|
||||||
|
this.asnFrom = {};
|
||||||
|
// 清空表格数据
|
||||||
|
this.crud.data = [];
|
||||||
|
//还原默认值
|
||||||
|
this.fullscreen = false
|
||||||
|
// 执行关闭操作
|
||||||
|
done();
|
||||||
|
},
|
||||||
setTime() { //设置定时器
|
setTime() { //设置定时器
|
||||||
// this.clearTimeSet=setInterval(() => {
|
// this.clearTimeSet=setInterval(() => {
|
||||||
// this.asnTF();
|
// this.asnTF();
|
||||||
|
|
@ -500,17 +533,18 @@ export default {
|
||||||
const day = date.getDate().toString().padStart(2, '0')
|
const day = date.getDate().toString().padStart(2, '0')
|
||||||
//存当前时间
|
//存当前时间
|
||||||
this.asnFrom.orderDate = `${year}-${month}-${day}`
|
this.asnFrom.orderDate = `${year}-${month}-${day}`
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//查询库位
|
//查询库位
|
||||||
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.viewPropC1 = itObj.bepc;
|
||||||
this.viewPropC2 = itObj.bexq;
|
this.viewPropC2 = itObj.bexq;
|
||||||
}
|
}
|
||||||
if (data.area.bexb) {
|
if (data.area.bexb) {
|
||||||
this.pointTF=true;
|
this.pointTF = true;
|
||||||
let selectDate = { rAreaCode: null, itemCode: null }
|
let selectDate = {rAreaCode: null, itemCode: null}
|
||||||
selectDate.rAreaCode = data.area.code
|
selectDate.rAreaCode = data.area.code
|
||||||
selectDate.itemCode = code
|
selectDate.itemCode = code
|
||||||
// if (selectDate.rAreaCode === null) {
|
// if (selectDate.rAreaCode === null) {
|
||||||
|
|
@ -529,18 +563,19 @@ export default {
|
||||||
this.pointOptions = this.filterListObj(data_)
|
this.pointOptions = this.filterListObj(data_)
|
||||||
}
|
}
|
||||||
if (!(this.pointOptions.length > 0)) {
|
if (!(this.pointOptions.length > 0)) {
|
||||||
queryPointList({ code: 'ZZKW' }).then(re => {
|
queryPointList({code: 'ZZKW'}).then(re => {
|
||||||
this.pointOptions = re
|
this.pointOptions = re
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
this.pointTF=false;
|
this.pointTF = false;
|
||||||
queryPointList({ type: 'CH' }).then(re => {
|
queryPointList({type: 'CH'}).then(re => {
|
||||||
this.pointOptions = re
|
this.pointOptions = re
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//过滤重复数据
|
//过滤重复数据
|
||||||
filterListObj(listObj) {
|
filterListObj(listObj) {
|
||||||
let date = []
|
let date = []
|
||||||
|
|
@ -557,7 +592,8 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return date
|
return date
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//查询公用的下拉数据
|
//查询公用的下拉数据
|
||||||
getOnceOptionAll() {
|
getOnceOptionAll() {
|
||||||
//物料数据
|
//物料数据
|
||||||
|
|
@ -575,11 +611,12 @@ export default {
|
||||||
this.areaOptions = res
|
this.areaOptions = res
|
||||||
})
|
})
|
||||||
//获取单据类型
|
//获取单据类型
|
||||||
getBillTypes({type:'100001',enabled:true}).then(res=>{
|
getBillTypes({type: '100001', enabled: true}).then(res => {
|
||||||
this.billTypeOptions = res
|
this.billTypeOptions = res
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
}
|
||||||
|
,
|
||||||
|
|
||||||
//判断是否是新增主表和是查看明细新政附表
|
//判断是否是新增主表和是查看明细新政附表
|
||||||
asnTF() {
|
asnTF() {
|
||||||
|
|
@ -600,7 +637,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getNewDate()
|
this.getNewDate()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//新增主表数据
|
//新增主表数据
|
||||||
submitFromAsn(data) {
|
submitFromAsn(data) {
|
||||||
//校验
|
//校验
|
||||||
|
|
@ -612,16 +650,21 @@ export default {
|
||||||
//加载数据
|
//加载数据
|
||||||
this.asnTF()
|
this.asnTF()
|
||||||
this.$message.success('添加成功')
|
this.$message.success('添加成功')
|
||||||
// this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.$router.push({ path: '/business-asn/viewAsnDetail', query: { ids: res.id } })
|
//this.$router.push({path: '/business-asn/viewAsnDetail', query: {ids: res.id}})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
rkAndQxButtonM(num) {
|
rkAndQxButtonM(num) {
|
||||||
if (num === 1) { //整单入库
|
if (num === 1) { //整单入库
|
||||||
|
console.log()
|
||||||
|
if (this.asnFrom.id <= 0) {
|
||||||
|
this.crud.notify('请先提交入库单', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
}
|
||||||
this.logining1 = true
|
this.logining1 = true
|
||||||
let data = this.asnDetailButton
|
let data = this.asnDetailButton
|
||||||
data.button = num
|
data.button = num
|
||||||
|
|
@ -639,7 +682,7 @@ export default {
|
||||||
this.logining2 = true
|
this.logining2 = true
|
||||||
let data = this.asnDetailButton
|
let data = this.asnDetailButton
|
||||||
data.button = num
|
data.button = num
|
||||||
data.id =this.detailId
|
data.id = this.detailId
|
||||||
rkAndQxButton(data).then(res => {
|
rkAndQxButton(data).then(res => {
|
||||||
this.$message.success(res)
|
this.$message.success(res)
|
||||||
this.dyrkTf = false
|
this.dyrkTf = false
|
||||||
|
|
@ -666,27 +709,31 @@ export default {
|
||||||
this.logining3 = false
|
this.logining3 = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//单一入库
|
//单一入库
|
||||||
dyrkM(data) {
|
dyrkM(data) {
|
||||||
this.detailId=data[0].id;
|
this.detailId = data[0].id;
|
||||||
this.dyrkTf = !this.dyrkTf
|
this.dyrkTf = !this.dyrkTf
|
||||||
console.log(data[0].item.code)
|
console.log(data[0].item.code)
|
||||||
this.getPointList(null,data[0].item.code, this.asn)
|
this.getPointList(null, data[0].item.code, this.asn)
|
||||||
this.asnDetailButton.asnDetailData = data[0]
|
this.asnDetailButton.asnDetailData = data[0]
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//取消收货
|
//取消收货
|
||||||
qxshM(data) {
|
qxshM(data) {
|
||||||
this.asnDetailButton.asnDetailDataS = data
|
this.asnDetailButton.asnDetailDataS = data
|
||||||
this.rkAndQxButtonM(3)
|
this.rkAndQxButtonM(3)
|
||||||
},
|
}
|
||||||
|
,
|
||||||
handleSuccess(response, file, fileList) {
|
handleSuccess(response, file, fileList) {
|
||||||
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.$refs.upload.clearFiles()
|
this.$refs.upload.clearFiles()
|
||||||
this.crud.status.add = CRUD.STATUS.NORMAL
|
this.crud.status.add = CRUD.STATUS.NORMAL
|
||||||
this.crud.resetForm()
|
this.crud.resetForm()
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
}
|
||||||
|
,
|
||||||
// 监听上传失败
|
// 监听上传失败
|
||||||
handleError(e, file, fileList) {
|
handleError(e, file, fileList) {
|
||||||
const msg = JSON.parse(e.message)
|
const msg = JSON.parse(e.message)
|
||||||
|
|
@ -702,5 +749,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.vue-draggable-resizable {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue