20 changed files with 5678 additions and 187 deletions
-
1package.json
-
5src/api/base/normalSearch.js
-
18src/api/material/issureSo.js
-
17src/api/material/poReceive.js
-
18src/api/material/productionStock.js
-
12src/api/production/shopOrder.js
-
3src/api/shipment/detail.js
-
5src/api/shipment/index.js
-
3src/assets/scss/rq.scss
-
410src/views/modules/finshProduct/outWarehouse.vue
-
54src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
-
41src/views/modules/finshProduct/outWarehouse/shipmentBox.vue
-
579src/views/modules/material/com_issureSo_add_or_update.vue
-
799src/views/modules/material/com_poReceiving_add_or_update.vue
-
600src/views/modules/material/com_productionStock_add_or_update.vue
-
947src/views/modules/material/issureSo.vue
-
793src/views/modules/material/poReceiving.vue
-
947src/views/modules/material/productionStock.vue
-
593src/views/modules/production/order.vue
-
20src/views/modules/sys/user-add-or-update.vue
@ -0,0 +1,5 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
export const getLocationListForSearch = data => createAPI(`/normalSearch/getLocationListForSearch`,'post',data) |
||||
|
export const getPartListForSearch = data => createAPI(`/normalSearch/getPartListForSearch`,'post',data) |
||||
|
|
||||
@ -0,0 +1,18 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
export const searchTransHeader = data => createAPI(`/issureSo/searchTransHeader`,'post',data) |
||||
|
|
||||
|
export const searchTransDetail = data => createAPI(`/issureSo/searchTransDetail`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailSub = data => createAPI(`/issureSo/searchTransDetailSub`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const getWareHouseList = data => createAPI(`/issureSo/getWareHouseList`,'post',data) |
||||
|
export const saveTransHeaderData= data => createAPI(`/issureSo/saveTransHeaderData`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailAndSubCach= data => createAPI(`/issureSo/searchTransDetailAndSubCach`,'post',data) |
||||
|
export const createNewCachRoll= data => createAPI(`/issureSo/createNewCachRoll`,'post',data) |
||||
|
export const finalSaveTransHeaderDetail= data => createAPI(`/issureSo/finalSaveTransHeaderDetail`,'post',data) |
||||
|
export const deleteSubCach= data => createAPI(`/issureSo/deleteSubCach`,'post',data) |
||||
|
export const deleteTransHeaderData= data => createAPI(`/issureSo/deleteTransHeaderData`,'post',data) |
||||
|
export const saveIssureCach= data => createAPI(`/issureSo/saveIssureCach`,'post',data) |
||||
@ -0,0 +1,17 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
export const searchTransHeader = data => createAPI(`/poReceive/searchTransHeader`,'post',data) |
||||
|
|
||||
|
export const searchTransDetail = data => createAPI(`/poReceive/searchTransDetail`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailSub = data => createAPI(`/poReceive/searchTransDetailSub`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const getWareHouseList = data => createAPI(`/poReceive/getWareHouseList`,'post',data) |
||||
|
export const saveTransHeaderData= data => createAPI(`/poReceive/saveTransHeaderData`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailAndSubCach= data => createAPI(`/poReceive/searchTransDetailAndSubCach`,'post',data) |
||||
|
export const createNewCachRoll= data => createAPI(`/poReceive/createNewCachRoll`,'post',data) |
||||
|
export const finalSaveTransHeaderDetail= data => createAPI(`/poReceive/finalSaveTransHeaderDetail`,'post',data) |
||||
|
export const deleteSubCach= data => createAPI(`/poReceive/deleteSubCach`,'post',data) |
||||
|
export const deleteTransHeaderData= data => createAPI(`/poReceive/deleteTransHeaderData`,'post',data) |
||||
@ -0,0 +1,18 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
export const searchTransHeader = data => createAPI(`/productionStock/searchTransHeader`,'post',data) |
||||
|
|
||||
|
export const searchTransDetail = data => createAPI(`/productionStock/searchTransDetail`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailSub = data => createAPI(`/productionStock/searchTransDetailSub`,'post',data) |
||||
|
|
||||
|
|
||||
|
export const getWareHouseList = data => createAPI(`/productionStock/getWareHouseList`,'post',data) |
||||
|
export const saveTransHeaderData= data => createAPI(`/productionStock/saveTransHeaderData`,'post',data) |
||||
|
|
||||
|
export const searchTransDetailAndSubCach= data => createAPI(`/productionStock/searchTransDetailAndSubCach`,'post',data) |
||||
|
export const createNewCachRoll= data => createAPI(`/productionStock/createNewCachRoll`,'post',data) |
||||
|
export const finalSaveTransHeaderDetail= data => createAPI(`/productionStock/finalSaveTransHeaderDetail`,'post',data) |
||||
|
export const deleteSubCach= data => createAPI(`/productionStock/deleteSubCach`,'post',data) |
||||
|
export const deleteTransHeaderData= data => createAPI(`/productionStock/deleteTransHeaderData`,'post',data) |
||||
|
export const saveStockCach= data => createAPI(`/productionStock/saveStockCach`,'post',data) |
||||
@ -0,0 +1,12 @@ |
|||||
|
import {createAPI} from "../../utils/httpRequest"; |
||||
|
|
||||
|
export const getDataList = (data) => createAPI(`/shop/order/list`,'post',data) |
||||
|
export const getIFSDataList = (data) => createAPI(`/shop/order/ifs/list`,'post',data) |
||||
|
export const getDataPageList = (data) => createAPI(`/shop/order/page/${data.no}/${data.size}`,'post',data) |
||||
|
|
||||
|
export const saveData = (data) => createAPI(`/shop/order/add`,'post',data) |
||||
|
|
||||
|
export const editData = (data) => createAPI(`/shop/order/edit`,'post',data) |
||||
|
|
||||
|
export const deleteData = (data) => createAPI(`/shop/order/remove`,'post',data) |
||||
|
export const getPartDataList = (data) => createAPI(`/shop/order/part`,'post',data) |
||||
@ -0,0 +1,3 @@ |
|||||
|
import {createAPI} from '../../utils/httpRequest' |
||||
|
|
||||
|
export const getShipmentDetailList = (data) => createAPI(`/shipment/detail/list`,'post',data) |
||||
@ -0,0 +1,5 @@ |
|||||
|
import {createAPI} from '../../utils/httpRequest' |
||||
|
|
||||
|
export const getShipmentList = (data) => createAPI( '/shipment/list','post', data) |
||||
|
|
||||
|
export const getShipmentPage = (data) => createAPI( `/shipment/list/${data.no}/${data.size}`,'post',data) |
||||
@ -0,0 +1,410 @@ |
|||||
|
<script> |
||||
|
import OutWarehouseDetail from './outWarehouse/outWarehouseDetail.vue' |
||||
|
import {getShipmentPage} from '../../../api/shipment' |
||||
|
import {getShipmentDetailList} from '../../../api/shipment/detail' |
||||
|
import ShipmentBox from './outWarehouse/shipmentBox.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: "outWarehouse", |
||||
|
components: {ShipmentBox, OutWarehouseDetail}, |
||||
|
props:{ |
||||
|
height:{ |
||||
|
type: Number, |
||||
|
default:300, |
||||
|
} |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
loading: false, |
||||
|
open: false, |
||||
|
queryForm:{ |
||||
|
shipmentId: "", |
||||
|
startDate: "", |
||||
|
endDate: "", |
||||
|
}, |
||||
|
no: 1, |
||||
|
size: 50, |
||||
|
total: 0, |
||||
|
dataList:[], |
||||
|
// selectDataList:[], |
||||
|
form:{}, |
||||
|
columnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002TableShipmentId', |
||||
|
tableId: "400002Table", |
||||
|
tableName: "shipment", |
||||
|
columnProp: "shipmentId", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "发货ID", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002TableShipDate', |
||||
|
tableId: "400002Table", |
||||
|
tableName: "shipment", |
||||
|
columnProp: "shipDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "发货日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002TableCustomerNo', |
||||
|
tableId: "400002Table", |
||||
|
tableName: "shipment", |
||||
|
columnProp: "customerNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "客户编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002TableCustomerName', |
||||
|
tableId: "400002Table", |
||||
|
tableName: "shipment", |
||||
|
columnProp: "customerName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "客户名称", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 360 |
||||
|
}, |
||||
|
], |
||||
|
row:{}, |
||||
|
activeName:'detail', |
||||
|
detailDataList:[], |
||||
|
columnDetailList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2PartNo', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "料号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2PartDesc', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2SaleQty', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "saleQty", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2OrderRef1', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "orderRef1", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "关联单号1", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2OrderRef2', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "orderRef2", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "关联单号2", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 400002, |
||||
|
serialNumber: '400002Table2OrderRef3', |
||||
|
tableId: "400002Table2", |
||||
|
tableName: "ShipmentDetail", |
||||
|
columnProp: "orderRef3", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "关联单号3", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
getDataList(){ |
||||
|
let params = { |
||||
|
...this.queryForm, |
||||
|
no: this.no, |
||||
|
size: this.size, |
||||
|
site:this.$store.state.user.site |
||||
|
} |
||||
|
this.dataList = []; |
||||
|
this.loading = true; |
||||
|
getShipmentPage(params).then(({data})=>{ |
||||
|
this.loading = false; |
||||
|
if (data && data.code === 0){ |
||||
|
this.dataList = data.page.records; |
||||
|
this.total = data.page.total; |
||||
|
if (this.total > 0){ |
||||
|
this.handleRowClick(this.dataList[0]) |
||||
|
} |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.loading = false; |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
handleQuery(){ |
||||
|
this.getDataList(); |
||||
|
}, |
||||
|
handleSizeChange(val){ |
||||
|
this.size = val; |
||||
|
this.getDataList(); |
||||
|
}, |
||||
|
handleCurrentChange(val){ |
||||
|
this.no = val; |
||||
|
this.getDataList(); |
||||
|
}, |
||||
|
handleOutWarehouse(row){ |
||||
|
this.form = {...row} |
||||
|
this.open=true; |
||||
|
}, |
||||
|
getDetailDataList(){ |
||||
|
let params = { |
||||
|
shipmentId: this.row.shipmentId, |
||||
|
site:this.row.site |
||||
|
} |
||||
|
this.detailDataList = []; |
||||
|
getShipmentDetailList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.detailDataList = data.rows; |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
rowStyle({row}){ |
||||
|
if (row.site === this.row.site && row.shipmentId === this.row.shipmentId){ |
||||
|
return { |
||||
|
background: '#E8F7F6' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
handleRowClick(row){ |
||||
|
this.row = {...row}; |
||||
|
} |
||||
|
}, |
||||
|
watch:{ |
||||
|
row(newVal,oldVal){ |
||||
|
if (newVal){ |
||||
|
this.getDetailDataList(); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getDataList(); |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="width: 1100px"> |
||||
|
<el-form :model="queryForm" ref="queryForm" label-position="top"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="发货ID"> |
||||
|
<el-input v-model="queryForm.shipmentId"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="7"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="11"> |
||||
|
<el-form-item label="发货日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="queryForm.startDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="2"> |
||||
|
<el-form-item label=" "> |
||||
|
<label style="margin-left: 0px;font-size: 19px">➞</label> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="11"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="queryForm.endDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="handleQuery">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<el-table :data="dataList" v-loading="loading" border :height="height" @row-click="handleRowClick" :row-style="rowStyle"> |
||||
|
<el-table-column align="center" label="操作" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link @click="handleOutWarehouse(scope.row)">装箱出库</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- <div style="float: left;margin-top: 10px;color: gray;font-size: 13px" v-html="`共 <span style='color: #16B3A3'>${total}</span> 条 记 录,已 选 <span style='color: #16B3A3'>${selectDataList.length}</span> 条`"></div>--> |
||||
|
<el-pagination |
||||
|
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page="no" |
||||
|
:page-sizes="[50, 100, 1000]" |
||||
|
:page-size="size" |
||||
|
:total="total" |
||||
|
style="margin-top: 0px" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
<el-tabs v-model="activeName"> |
||||
|
<el-tab-pane label="出库明细" name="detail"> |
||||
|
<out-warehouse-detail :height="420" :data-list="detailDataList" :column-list="columnDetailList"></out-warehouse-detail> |
||||
|
</el-tab-pane> |
||||
|
</el-tabs> |
||||
|
|
||||
|
<el-dialog title="装箱出库" v-drag :visible.sync="open" width="800px" :close-on-click-modal="false"> |
||||
|
<el-form :model="form" ref="form" label-position="top"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label="发货ID"> |
||||
|
<el-input v-model="form.shipmentId" disabled></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label="客户编码"> |
||||
|
<el-input v-model="form.customerNo" disabled></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="客户名称"> |
||||
|
<el-input v-model="form.customerName" disabled></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<shipment-box :data-list="[]" :height="200"></shipment-box> |
||||
|
<el-footer style="height: 20px"></el-footer> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,54 @@ |
|||||
|
<script> |
||||
|
export default { |
||||
|
name: 'outWarehouseDetail', |
||||
|
props:{ |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:300 |
||||
|
}, |
||||
|
dataList:{ |
||||
|
type:Array, |
||||
|
default:()=>[] |
||||
|
}, |
||||
|
columnList:{ |
||||
|
type:Array, |
||||
|
default:()=>[] |
||||
|
}, |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
|
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<el-table :data="dataList" border style="width: 100%" :height="height"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,41 @@ |
|||||
|
<script> |
||||
|
export default { |
||||
|
name: 'shipmentBox', |
||||
|
props:{ |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:300 |
||||
|
}, |
||||
|
dataList:{ |
||||
|
type:Array, |
||||
|
default:()=>[] |
||||
|
}, |
||||
|
}, |
||||
|
data(){ |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="display: flex;justify-content: space-between;"> |
||||
|
<div><el-button type="primary" >新增箱子</el-button></div> |
||||
|
<div><el-button type="primary" @click="$emit('lastOutShipment')">最终出库</el-button></div> |
||||
|
</div> |
||||
|
<el-table :data="dataList" style="width: 100%" border :height="height"> |
||||
|
<el-table-column prop="boxNo" label="箱号" width="400" header-align="center" align="left"></el-table-column> |
||||
|
<el-table-column align="center" label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link >查看</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,579 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-dialog |
||||
|
width="40%" |
||||
|
title="发料单明细" |
||||
|
:close-on-click-modal="false" |
||||
|
:visible.sync="visible" |
||||
|
@close="closeSaveDialog"> |
||||
|
<el-form ref="saveForm" :model="dataForm" label-position="top" label-width="100px" > |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="发料单号"> |
||||
|
<el-input v-model="dataForm.transNo" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="6">--> |
||||
|
<!-- <el-form-item label="供应商编码">--> |
||||
|
<!-- <el-input v-model="dataForm.partnerID" disabled ></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-col>--> |
||||
|
<!-- <el-col :span="6">--> |
||||
|
<!-- <el-form-item label="供应商名称">--> |
||||
|
<!-- <el-input v-model="dataForm.partnerName" disabled ></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-col>--> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="visible = false">关闭</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-input v-model="dataForm.warehouseID" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="发料日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.transDate" |
||||
|
type="date" |
||||
|
disabled |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="经手人"> |
||||
|
<el-input v-model="dataForm.receiverName" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="生产订单"> |
||||
|
<el-input v-model="dataForm.orderRef1" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item label="请扫描标签"> |
||||
|
<el-input v-model="dataForm.scanSerialNo" ref="scan" @keyup.enter.native="scanSaveCach()" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="dataFormSubmit()">{{'最终出库'}}</el-button> |
||||
|
<!-- <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>--> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
height="300" |
||||
|
border |
||||
|
:row-class-name="tableRowClassName" |
||||
|
v-loading="false" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="60" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="deleteCach(scope.row)">删除</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
|
||||
|
|
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
|
||||
|
} from "@/api/base/normalSearch.js" |
||||
|
import { |
||||
|
searchTransDetailAndSubCach |
||||
|
,createNewCachRoll |
||||
|
,finalSaveTransHeaderDetail |
||||
|
,deleteSubCach, |
||||
|
saveIssureCach, |
||||
|
} from "@/api/material/issureSo.js" |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
import {searchTransDetail} from "../../../api/material/poReceive"; |
||||
|
export default { |
||||
|
model:{ |
||||
|
prop:'value', |
||||
|
event:'change', |
||||
|
}, |
||||
|
props:{ |
||||
|
value:{ |
||||
|
required:true, |
||||
|
type:String, |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
tagNo:'', |
||||
|
tagNo1:'', |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
site:this.$store.state.user.site, |
||||
|
warehouseID:'', |
||||
|
transNo:'', |
||||
|
transDate:'', |
||||
|
receiverName:'', |
||||
|
receiver:'', |
||||
|
scanSerialNo:'', |
||||
|
orderRef1:'', |
||||
|
}, |
||||
|
scanModalFlag:false, |
||||
|
rollData:{ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
}, |
||||
|
dataList:[], |
||||
|
scanSerial:'', |
||||
|
columnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4PartNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4PartDesc', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料名", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4RollNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "rollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4RollQty', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 60 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4BatchNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "batchNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "批号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 200002, |
||||
|
// serialNumber: '200002Table4WdrNo', |
||||
|
// tableId: "200002Table4", |
||||
|
// tableName: "发料单已扫卷", |
||||
|
// columnProp: "wdrNo", |
||||
|
// headerAlign: "center", |
||||
|
// align: "left", |
||||
|
// columnLabel: "W/D/R", |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4ManufactureDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4ExpiredDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4LocationID', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "locationID", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "库位", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4EnterByName', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "enterByName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4EnterDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "发料单已扫卷", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created Time", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 130 |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 133) { |
||||
|
if(type==1) { |
||||
|
strVal = this.dataForm.partNo |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 133) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.dataForm.partNo = val.part_no |
||||
|
this.dataForm.partDesc = val.part_desc |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
init (row) { |
||||
|
this.rollData={ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
} |
||||
|
this.cleanData() |
||||
|
searchTransDetailAndSubCach(row).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
let dataRow= data.row |
||||
|
this.dataList = data.rows |
||||
|
this.dataForm={ |
||||
|
site:dataRow.site, |
||||
|
warehouseID:data.row.warehouseID, |
||||
|
transNo:dataRow.transNo, |
||||
|
transDate:dataRow.transDate, |
||||
|
receiverName:dataRow.receiverName, |
||||
|
orderRef1:dataRow.orderRef1, |
||||
|
scanSerialNo:'', |
||||
|
} |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { this.$refs.scan.focus();}) |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
createNewRoll(){ |
||||
|
if(this.dataForm.partNo===''){ |
||||
|
this.$alert('请输入物料!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.locationId===''){ |
||||
|
this.$alert('请选择库位!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.batchNo===''){ |
||||
|
this.$alert('请输入批号!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.manufactureDate===''){ |
||||
|
this.$alert('请选择生产日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.expiredDate===''){ |
||||
|
this.$alert('请选择失效日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.perQty===''){ |
||||
|
this.$alert('请输入每卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber===''){ |
||||
|
this.$alert('请输入卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber>10000){ |
||||
|
this.$alert('卷数量超过一万!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
let inData={ |
||||
|
site:this.dataForm.site, |
||||
|
transNo:this.dataForm.transNo, |
||||
|
partNo:this.dataForm.partNo, |
||||
|
rollNo:'', |
||||
|
rollQty:this.rollData.perQty, |
||||
|
batchNo:this.dataForm.batchNo, |
||||
|
wdrNo:this.dataForm.wdrNo, |
||||
|
locationID:this.dataForm.locationId, |
||||
|
manufactureDate:this.dataForm.manufactureDate, |
||||
|
expiredDate:this.dataForm.expiredDate, |
||||
|
rollNumber:this.rollData.rollNumber, |
||||
|
|
||||
|
} |
||||
|
createNewCachRoll(inData).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 表单提交 |
||||
|
dataFormSubmit () { |
||||
|
finalSaveTransHeaderDetail(this.dataForm).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
closeSaveDialog(){ |
||||
|
this.cleanData() |
||||
|
}, |
||||
|
cleanData(){ |
||||
|
for (var prop in this.dataForm) { |
||||
|
if (this.dataForm.hasOwnProperty(prop)) { |
||||
|
this.dataForm[prop] = ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
deleteCach(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteSubCach(row).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error( data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
scanSaveCach(){ |
||||
|
let arr=this.dataForm.scanSerialNo.split(','); |
||||
|
if(arr.length<2){ |
||||
|
this.$message.error( '二维码格式有误!') |
||||
|
} |
||||
|
let inData={ |
||||
|
site:this.dataForm.site, |
||||
|
transNo:this.dataForm.transNo, |
||||
|
orderNo:this.dataForm.orderRef1, |
||||
|
rollNo:arr[1], |
||||
|
} |
||||
|
saveIssureCach(inData).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功'+data.str) |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
this.dataForm.scanSerialNo='' |
||||
|
} else { |
||||
|
this.$message.error( data.msg) |
||||
|
this.dataForm.scanSerialNo='' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
tableRowClassName ({row, rowIndex}) { |
||||
|
var currentDate = new Date(); |
||||
|
var futureDate = new Date(); |
||||
|
futureDate.setDate(currentDate.getDate() + 90); |
||||
|
var date = new Date(row.expiredDate) |
||||
|
if (date.getTime() < futureDate.getTime()) { |
||||
|
console.log('快过期了') |
||||
|
return 'error-row' |
||||
|
} |
||||
|
return '' |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style > |
||||
|
|
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,799 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-dialog |
||||
|
width="40%" |
||||
|
title="入库单明细" |
||||
|
:close-on-click-modal="false" |
||||
|
:visible.sync="visible" |
||||
|
@close="closeSaveDialog"> |
||||
|
<el-form ref="saveForm" :model="dataForm" label-position="top" label-width="100px" > |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="入库单号"> |
||||
|
<el-input v-model="dataForm.transNo" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="供应商编码"> |
||||
|
<el-input v-model="dataForm.partnerID" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="供应商名称"> |
||||
|
<el-input v-model="dataForm.partnerName" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="visible = false">关闭</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-input v-model="dataForm.warehouseID" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="入库日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.transDate" |
||||
|
type="date" |
||||
|
disabled |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="经手人"> |
||||
|
<el-input v-model="dataForm.receiverName" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="采购单号"> |
||||
|
<el-input v-model="dataForm.orderRef1" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item > |
||||
|
<span slot="label" style="" @click="getBaseList(133,1)" ><a herf="#">物料编码</a></span> |
||||
|
<el-input v-model="dataForm.partNo" @change="getPartDesc" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="物料描述"> |
||||
|
<el-input v-model="dataForm.partDesc" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="库位"> |
||||
|
<el-select v-model="dataForm.locationId" style="width: 100%;"> |
||||
|
<el-option :value="i.locationId" :label="i.locationName" v-for="i in locationList" :key="i.locationId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="scanModel()">{{'扫描条码入库'}}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="批号"> |
||||
|
<el-input v-model="dataForm.batchNo" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="W/D/R"> |
||||
|
<el-input v-model="dataForm.wdrNo" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="生产日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.manufactureDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="失效日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.expiredDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="每卷数量"> |
||||
|
<el-input v-model="rollData.perQty" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="卷数"> |
||||
|
<el-input v-model="rollData.rollNumber" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="createNewRoll()">{{'创建分卷'}}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="dataFormSubmit()">{{'最终保存'}}</el-button> |
||||
|
<!-- <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>--> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
height="300" |
||||
|
border |
||||
|
v-loading="false" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="60" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="deleteCach(scope.row)">删除</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<el-dialog title="扫描入库" :close-on-click-modal="false" v-drag :visible.sync="scanModalFlag" width="620px" > |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="12" > |
||||
|
<el-form-item label="请扫描标签"> |
||||
|
<el-input ref="scan" v-model="scanSerial" @keyup.enter.native="scanSaveCach()" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item > |
||||
|
<span slot="label" style="" @click="getBaseList(133,1)" ><a herf="#">物料编码</a></span> |
||||
|
<el-input v-model="dataForm.partNo" @change="getPartDesc" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="物料描述"> |
||||
|
<el-input v-model="dataForm.partDesc" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="库位"> |
||||
|
<el-select v-model="dataForm.locationId" style="width: 100%;"> |
||||
|
<el-option :value="i.locationId" :label="i.locationName" v-for="i in locationList" :key="i.locationId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="批号"> |
||||
|
<el-input v-model="dataForm.batchNo" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="W/D/R"> |
||||
|
<el-input v-model="dataForm.wdrNo" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="生产日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.manufactureDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="失效日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.expiredDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="每卷数量"> |
||||
|
<el-input v-model="rollData.perQty" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="卷数"> |
||||
|
<el-input v-model="rollData.rollNumber" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="createNewRoll()">{{'创建分卷'}}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="scanModalFlag = false">{{'关闭'}}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-footer style="height:30px;margin-top: 50px;text-align:center"> |
||||
|
<el-button type="primary" @click="dataFormSubmit()" >最终保存</el-button> |
||||
|
<el-button type="primary" @click="scanModalFlag = false">取消</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getLocationListForSearch |
||||
|
,getPartListForSearch |
||||
|
} from "@/api/base/normalSearch.js" |
||||
|
import { |
||||
|
searchTransDetailAndSubCach |
||||
|
,createNewCachRoll |
||||
|
,finalSaveTransHeaderDetail |
||||
|
,deleteSubCach |
||||
|
|
||||
|
} from "@/api/material/poReceive.js" |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
import {searchTransDetail} from "../../../api/material/poReceive"; |
||||
|
export default { |
||||
|
model:{ |
||||
|
prop:'value', |
||||
|
event:'change', |
||||
|
}, |
||||
|
props:{ |
||||
|
value:{ |
||||
|
required:true, |
||||
|
type:String, |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
tagNo:'', |
||||
|
tagNo1:'', |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
site:this.$store.state.user.site, |
||||
|
warehouseID:'', |
||||
|
transNo:'', |
||||
|
partnerID:'', |
||||
|
partnerName:'', |
||||
|
transDate:'', |
||||
|
receiverName:'', |
||||
|
orderRef1:'', |
||||
|
partNo:'', |
||||
|
partDesc:'', |
||||
|
locationId:'', |
||||
|
batchNo:'', |
||||
|
wdrNo:'', |
||||
|
manufactureDate:'', |
||||
|
expiredDate:'', |
||||
|
}, |
||||
|
scanModalFlag:false, |
||||
|
rollData:{ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
}, |
||||
|
dataList:[], |
||||
|
scanSerial:'', |
||||
|
columnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4PartNo', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4PartDesc', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料名", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4RollNo', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "rollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4RollQty', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 60 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4BatchNo', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "batchNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "批号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4WdrNo', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "wdrNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "W/D/R", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4ManufactureDate', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4ExpiredDate', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4LocationID', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "locationID", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "库位", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4EnterByName', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "enterByName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200001, |
||||
|
serialNumber: '200001Table4EnterDate', |
||||
|
tableId: "200001Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created Time", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 130 |
||||
|
}, |
||||
|
], |
||||
|
locationList:[], |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 133) { |
||||
|
if(type==1) { |
||||
|
strVal = this.dataForm.partNo |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 133) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.dataForm.partNo = val.part_no |
||||
|
this.dataForm.partDesc = val.part_desc |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
init (row) { |
||||
|
this.rollData={ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
} |
||||
|
this.cleanData() |
||||
|
searchTransDetailAndSubCach(row).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
let dataRow= data.row |
||||
|
this.dataList = data.rows |
||||
|
this.dataForm={ |
||||
|
site:dataRow.site, |
||||
|
warehouseID:data.row.warehouseID, |
||||
|
transNo:dataRow.transNo, |
||||
|
partnerID:dataRow.partnerID, |
||||
|
partnerName:dataRow.partnerName, |
||||
|
transDate:dataRow.transDate, |
||||
|
receiverName:dataRow.receiverName, |
||||
|
orderRef1:dataRow.orderRef1, |
||||
|
partNo:'', |
||||
|
partDesc:'', |
||||
|
locationId:'', |
||||
|
batchNo:'', |
||||
|
wdrNo:'', |
||||
|
manufactureDate:'', |
||||
|
expiredDate:'', |
||||
|
} |
||||
|
let inData2={ |
||||
|
site:row.site, |
||||
|
warehouseId:data.row.warehouseID, |
||||
|
active:'Y' |
||||
|
} |
||||
|
getLocationListForSearch(inData2).then(({data})=>{ |
||||
|
if(data.rows.length>0){ |
||||
|
this.locationList=data.rows |
||||
|
this.dataForm.locationId=data.rows[0].locationId |
||||
|
} |
||||
|
}) |
||||
|
this.visible = true |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
createNewRoll(){ |
||||
|
if(this.dataForm.partNo===''){ |
||||
|
this.$alert('请输入物料!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.locationId===''){ |
||||
|
this.$alert('请选择库位!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.batchNo===''){ |
||||
|
this.$alert('请输入批号!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.manufactureDate===''){ |
||||
|
this.$alert('请选择生产日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.expiredDate===''){ |
||||
|
this.$alert('请选择失效日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.perQty===''){ |
||||
|
this.$alert('请输入每卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber===''){ |
||||
|
this.$alert('请输入卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber>10000){ |
||||
|
this.$alert('卷数量超过一万!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
let inData={ |
||||
|
site:this.dataForm.site, |
||||
|
transNo:this.dataForm.transNo, |
||||
|
partNo:this.dataForm.partNo, |
||||
|
rollNo:'', |
||||
|
rollQty:this.rollData.perQty, |
||||
|
batchNo:this.dataForm.batchNo, |
||||
|
wdrNo:this.dataForm.wdrNo, |
||||
|
locationID:this.dataForm.locationId, |
||||
|
manufactureDate:this.dataForm.manufactureDate, |
||||
|
expiredDate:this.dataForm.expiredDate, |
||||
|
rollNumber:this.rollData.rollNumber, |
||||
|
|
||||
|
} |
||||
|
createNewCachRoll(inData).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 表单提交 |
||||
|
dataFormSubmit () { |
||||
|
finalSaveTransHeaderDetail(this.dataForm).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
closeSaveDialog(){ |
||||
|
this.cleanData() |
||||
|
}, |
||||
|
cleanData(){ |
||||
|
for (var prop in this.dataForm) { |
||||
|
if (this.dataForm.hasOwnProperty(prop)) { |
||||
|
this.dataForm[prop] = ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
getPartDesc(){ |
||||
|
let data={ |
||||
|
site:this.dataForm.site, |
||||
|
partNo:this.dataForm.partNo, |
||||
|
active:'Y' |
||||
|
} |
||||
|
getPartListForSearch(data).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
if(data.rows.length>0){ |
||||
|
this.dataForm.partDesc=data.rows[0].partDesc |
||||
|
}else { |
||||
|
this.dataForm.partDesc="" |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
deleteCach(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteSubCach(row).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
scanModel(){ |
||||
|
this.scanSerial=''; |
||||
|
this.scanModalFlag=true; |
||||
|
this.$nextTick(() => { this.$refs.scan.focus();}) |
||||
|
}, |
||||
|
scanSaveCach(){ |
||||
|
debugger; |
||||
|
let str=this.scanSerial; |
||||
|
let arr = str.split(",") |
||||
|
if(arr.length<7){ |
||||
|
this.$message.error("二维码格式不对") |
||||
|
return false |
||||
|
} |
||||
|
let batchNo=arr[2] |
||||
|
if(batchNo.length<4){ |
||||
|
this.$message.error("二维码格式不对") |
||||
|
return false |
||||
|
} |
||||
|
let yearPrefix = '202'; // 假设年份的前缀是20,如果需要可以调整 |
||||
|
let year = yearPrefix + batchNo[0]; // 解析年份 |
||||
|
let month = ""; // 解析月份 |
||||
|
switch (batchNo[1]) { |
||||
|
case "x": |
||||
|
month = "10"; |
||||
|
break; |
||||
|
case "y": |
||||
|
month = "11"; |
||||
|
break; |
||||
|
case "z": |
||||
|
month = "12"; |
||||
|
break; |
||||
|
default: |
||||
|
month = '0'+batchNo[1]; |
||||
|
} |
||||
|
let day = batchNo.substring(2,4); // 解析日期 |
||||
|
let manufactureDate = this.dayjs(year+month+day, 'YYYYDDDHH').toDate(); |
||||
|
console.log(year) |
||||
|
console.log(month) |
||||
|
console.log(day) |
||||
|
console.log(year+month+day) |
||||
|
if (isNaN(manufactureDate.getTime())) { |
||||
|
this.$message.error("生产日期的日期格式不正确") |
||||
|
return false |
||||
|
} |
||||
|
let expiredDate = this.dayjs(arr[6], 'YYYYDDDHH').toDate(); |
||||
|
if (isNaN(expiredDate.getTime())) { |
||||
|
this.$message.error("失效日期的日期格式不正确") |
||||
|
return false |
||||
|
} |
||||
|
this.dataForm.manufactureDate=manufactureDate |
||||
|
this.dataForm.expiredDate=expiredDate |
||||
|
this.dataForm.batchNo=batchNo; |
||||
|
this.scanSerial='' |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style > |
||||
|
|
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,600 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-dialog |
||||
|
width="40%" |
||||
|
title="入库单明细" |
||||
|
:close-on-click-modal="false" |
||||
|
:visible.sync="visible" |
||||
|
@close="closeSaveDialog"> |
||||
|
<el-form ref="saveForm" :model="dataForm" label-position="top" label-width="100px" > |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="入库单号"> |
||||
|
<el-input v-model="dataForm.transNo" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="6">--> |
||||
|
<!-- <el-form-item label="供应商编码">--> |
||||
|
<!-- <el-input v-model="dataForm.partnerID" disabled ></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-col>--> |
||||
|
<!-- <el-col :span="6">--> |
||||
|
<!-- <el-form-item label="供应商名称">--> |
||||
|
<!-- <el-input v-model="dataForm.partnerName" disabled ></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-col>--> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="visible = false">关闭</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-input v-model="dataForm.warehouseID" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="入库日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="dataForm.transDate" |
||||
|
type="date" |
||||
|
disabled |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="经手人"> |
||||
|
<el-input v-model="dataForm.receiverName" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="生产订单"> |
||||
|
<el-input v-model="dataForm.orderRef1" disabled ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row :gutter="25"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="库位"> |
||||
|
<el-select v-model="dataForm.locationId" style="width: 100%;"> |
||||
|
<el-option :value="i.locationId" :label="i.locationName" v-for="i in locationList" :key="i.locationId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item label="请扫描标签"> |
||||
|
<el-input v-model="dataForm.scanSerialNo" ref="scan" @keyup.enter.native="scanSaveCach()" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="dataFormSubmit()">{{'最终入库'}}</el-button> |
||||
|
<!-- <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>--> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
height="300" |
||||
|
border |
||||
|
:row-class-name="tableRowClassName" |
||||
|
v-loading="false" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="60" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="deleteCach(scope.row)">删除</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
|
||||
|
|
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
getLocationListForSearch, |
||||
|
} from "@/api/base/normalSearch.js" |
||||
|
import { |
||||
|
searchTransDetailAndSubCach |
||||
|
,createNewCachRoll |
||||
|
,finalSaveTransHeaderDetail |
||||
|
,deleteSubCach, |
||||
|
saveStockCach, |
||||
|
} from "@/api/material/productionStock.js" |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
import {searchTransDetail} from "../../../api/material/poReceive"; |
||||
|
export default { |
||||
|
model:{ |
||||
|
prop:'value', |
||||
|
event:'change', |
||||
|
}, |
||||
|
props:{ |
||||
|
value:{ |
||||
|
required:true, |
||||
|
type:String, |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
locationList:[], |
||||
|
tagNo:'', |
||||
|
tagNo1:'', |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
site:this.$store.state.user.site, |
||||
|
warehouseID:'', |
||||
|
transNo:'', |
||||
|
transDate:'', |
||||
|
receiverName:'', |
||||
|
receiver:'', |
||||
|
scanSerialNo:'', |
||||
|
orderRef1:'', |
||||
|
locationId:'', |
||||
|
}, |
||||
|
scanModalFlag:false, |
||||
|
rollData:{ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
}, |
||||
|
dataList:[], |
||||
|
scanSerial:'', |
||||
|
columnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4PartNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4PartDesc', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "物料名", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4RollNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "rollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4RollQty', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 60 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4BatchNo', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "batchNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "批号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 200002, |
||||
|
// serialNumber: '200002Table4WdrNo', |
||||
|
// tableId: "200002Table4", |
||||
|
// tableName: "入库单已扫卷", |
||||
|
// columnProp: "wdrNo", |
||||
|
// headerAlign: "center", |
||||
|
// align: "left", |
||||
|
// columnLabel: "W/D/R", |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4ManufactureDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4ExpiredDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4LocationID', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "locationID", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "库位", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4EnterByName', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "enterByName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table4EnterDate', |
||||
|
tableId: "200002Table4", |
||||
|
tableName: "入库单已扫卷", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "Created Time", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 130 |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 133) { |
||||
|
if(type==1) { |
||||
|
strVal = this.dataForm.partNo |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 133) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.dataForm.partNo = val.part_no |
||||
|
this.dataForm.partDesc = val.part_desc |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
init (row) { |
||||
|
this.rollData={ |
||||
|
perQty:'', |
||||
|
rollNumber:'', |
||||
|
} |
||||
|
this.cleanData() |
||||
|
searchTransDetailAndSubCach(row).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
let dataRow= data.row |
||||
|
this.dataList = data.rows |
||||
|
this.dataForm={ |
||||
|
site:dataRow.site, |
||||
|
warehouseID:data.row.warehouseID, |
||||
|
transNo:dataRow.transNo, |
||||
|
transDate:dataRow.transDate, |
||||
|
receiverName:dataRow.receiverName, |
||||
|
orderRef1:dataRow.orderRef1, |
||||
|
scanSerialNo:'', |
||||
|
} |
||||
|
let inData2={ |
||||
|
site:row.site, |
||||
|
warehouseId:data.row.warehouseID, |
||||
|
active:'Y' |
||||
|
} |
||||
|
getLocationListForSearch(inData2).then(({data})=>{ |
||||
|
if(data.rows.length>0){ |
||||
|
this.locationList=data.rows |
||||
|
this.dataForm.locationId=data.rows[0].locationId |
||||
|
} |
||||
|
}) |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { this.$refs.scan.focus();}) |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
createNewRoll(){ |
||||
|
if(this.dataForm.partNo===''){ |
||||
|
this.$alert('请输入物料!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.locationId===''){ |
||||
|
this.$alert('请选择库位!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.batchNo===''){ |
||||
|
this.$alert('请输入批号!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.manufactureDate===''){ |
||||
|
this.$alert('请选择生产日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.dataForm.expiredDate===''){ |
||||
|
this.$alert('请选择失效日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.perQty===''){ |
||||
|
this.$alert('请输入每卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber===''){ |
||||
|
this.$alert('请输入卷数量!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.rollData.rollNumber>10000){ |
||||
|
this.$alert('卷数量超过一万!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
let inData={ |
||||
|
site:this.dataForm.site, |
||||
|
transNo:this.dataForm.transNo, |
||||
|
partNo:this.dataForm.partNo, |
||||
|
rollNo:'', |
||||
|
rollQty:this.rollData.perQty, |
||||
|
batchNo:this.dataForm.batchNo, |
||||
|
wdrNo:this.dataForm.wdrNo, |
||||
|
locationID:this.dataForm.locationId, |
||||
|
manufactureDate:this.dataForm.manufactureDate, |
||||
|
expiredDate:this.dataForm.expiredDate, |
||||
|
rollNumber:this.rollData.rollNumber, |
||||
|
|
||||
|
} |
||||
|
createNewCachRoll(inData).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 表单提交 |
||||
|
dataFormSubmit () { |
||||
|
finalSaveTransHeaderDetail(this.dataForm).then(({data})=>{ |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
closeSaveDialog(){ |
||||
|
this.cleanData() |
||||
|
}, |
||||
|
cleanData(){ |
||||
|
for (var prop in this.dataForm) { |
||||
|
if (this.dataForm.hasOwnProperty(prop)) { |
||||
|
this.dataForm[prop] = ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
deleteCach(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteSubCach(row).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error( data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
scanSaveCach(){ |
||||
|
let arr=this.dataForm.scanSerialNo.split(','); |
||||
|
if(arr.length<2){ |
||||
|
this.$message.error( '二维码格式有误!') |
||||
|
} |
||||
|
let inData={ |
||||
|
site:this.dataForm.site, |
||||
|
transNo:this.dataForm.transNo, |
||||
|
orderNo:this.dataForm.orderRef1, |
||||
|
locationID:this.dataForm.locationId, |
||||
|
rollNo:arr[1], |
||||
|
} |
||||
|
saveStockCach(inData).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.$message.success( '操作成功'+data.str) |
||||
|
searchTransDetailAndSubCach(this.dataForm).then(({data})=>{ |
||||
|
this.dataList = data.rows |
||||
|
}) |
||||
|
this.dataForm.scanSerialNo='' |
||||
|
} else { |
||||
|
this.$message.error( data.msg) |
||||
|
this.dataForm.scanSerialNo='' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
tableRowClassName ({row, rowIndex}) { |
||||
|
// var currentDate = new Date(); |
||||
|
// var futureDate = new Date(); |
||||
|
// futureDate.setDate(currentDate.getDate() + 90); |
||||
|
// var date = new Date(row.expiredDate) |
||||
|
// if (date.getTime() < futureDate.getTime()) { |
||||
|
// console.log('快过期了') |
||||
|
// return 'error-row' |
||||
|
// } |
||||
|
return '' |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style > |
||||
|
|
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,947 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
||||
|
<el-form-item :label="'生产订单'"> |
||||
|
<el-input v-model="searchData.orderRef1" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'发料单日期'"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.startDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="margin-top: 23px;"> |
||||
|
<label style="margin-left: 0px;font-size: 19px">➞</label> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.endDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-button type="primary" @click="searchTable()">查询</el-button> |
||||
|
<el-button type="primary" @click="addModal()">新增</el-button> |
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
:data="exportData" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:header="exportHeader" |
||||
|
:footer="exportFooter" |
||||
|
:fetch="createExportData" |
||||
|
:before-generate="startDownload" |
||||
|
:before-finish="finishDownload" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ '导出' }} |
||||
|
</download-excel> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
@row-click="changeData" |
||||
|
:height="height" |
||||
|
border |
||||
|
highlight-current-row |
||||
|
ref="mainTable" |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList1" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="150" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="updateModel(scope.row)">编辑</a> |
||||
|
<a type="text" size="small" @click="deleteData(scope.row)">删除</a> |
||||
|
<a type="text" size="small" @click="scanRoll(scope.row)">扫描</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 1000]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
|
||||
|
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
||||
|
<el-tab-pane label="明细" name="detail"> |
||||
|
<el-table |
||||
|
:data="dataList2" |
||||
|
:height="height" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList2" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-tab-pane> |
||||
|
<el-tab-pane label="卷明细" name="sub"> |
||||
|
<el-table |
||||
|
:data="dataList3" |
||||
|
:height="height" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList3" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-tab-pane> |
||||
|
</el-tabs> |
||||
|
|
||||
|
|
||||
|
<el-dialog title="生产发料-新增" :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="480px" > |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-select v-model="modelData.warehouseID" style="width: 100%;"> |
||||
|
<el-option :value="i.wareHouseId" :label="i.wareHouseName" v-for="i in wareHouseList" :key="i.menuId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发料日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="modelData.transDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" " > |
||||
|
<el-checkbox v-model="jumpFlag">保存后直接扫描</el-checkbox> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item label="经手人"> |
||||
|
<el-input v-model="modelData.receiver" style="width: 204px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="生产订单"> |
||||
|
<el-input v-model="modelData.orderRef1" style="width: 200px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">--> |
||||
|
<!-- <el-form-item >--> |
||||
|
<!-- <span slot="label" style="" @click="getBaseList(23,1)" ><a herf="#">供应商编码</a></span>--> |
||||
|
<!-- <el-input v-model="modelData.supplierId" style="width: 204px"></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="供应商名称">--> |
||||
|
<!-- <el-input v-model="modelData.supplierName" disabled style="width: 200px"></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-form>--> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="saveHeaderData()">保存</el-button> |
||||
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
|
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="searchTable" v-drag></add-or-update> |
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
searchTransHeader |
||||
|
,searchTransDetail |
||||
|
,searchTransDetailSub |
||||
|
,getWareHouseList |
||||
|
,saveTransHeaderData |
||||
|
,deleteTransHeaderData |
||||
|
} from "@/api/material/issureSo.js" |
||||
|
import { |
||||
|
getLocationListForSearch |
||||
|
} from "@/api/base/normalSearch.js" |
||||
|
import addOrUpdate from './com_issureSo_add_or_update' |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
export default { |
||||
|
components: { |
||||
|
Chooselist |
||||
|
,addOrUpdate |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
height:200, |
||||
|
modelFlag:false, |
||||
|
activeName: 'detail', |
||||
|
dataList: [], |
||||
|
dataList2: [], |
||||
|
dataList3: [], |
||||
|
addOrUpdateVisible:false, |
||||
|
searchData: { |
||||
|
page: 1, |
||||
|
limit: 100, |
||||
|
site:this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
orderRef1: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
transTypeDb:'SI', |
||||
|
}, |
||||
|
wareHouseList:[], |
||||
|
jumpFlag:true, |
||||
|
modelData:{ |
||||
|
transNo:'', |
||||
|
site:this.$store.state.user.site, |
||||
|
transDate:new Date(), |
||||
|
warehouseID:'', |
||||
|
receiver:'', |
||||
|
orderRef1:'', |
||||
|
supplierId:'', |
||||
|
supplierName:'', |
||||
|
enterBy:'', |
||||
|
}, |
||||
|
exportList:[], |
||||
|
pageIndex: 1, |
||||
|
pageSize: 100, |
||||
|
totalPage: 0, |
||||
|
dataListLoading: false, |
||||
|
currentRow:'', |
||||
|
headerData:'', |
||||
|
columnList1:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransNo', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "transNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "发料单号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransType', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "transType", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "发料类型", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransDate', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "transDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "发料日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1WareHouseID', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "warehouseID", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "仓库编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1OrderRef1', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "orderRef1", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "生产订单", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1ReceiverName', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "receiverName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "经手人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1EnterDate', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1EnterName', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产发料主表", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
columnList2:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2PartNo', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "料号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2PartDesc', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "料号描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2TransQty', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "transQty", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "发料数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2BatchNo', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "batchNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "批号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2LocationID', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "locationID", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "库位", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 200002, |
||||
|
// serialNumber: '200002Table2WdrNo', |
||||
|
// tableId: "200002Table2", |
||||
|
// tableName: "生产发料明细", |
||||
|
// columnProp: "wdrNo", |
||||
|
// headerAlign: "center", |
||||
|
// align: "left", |
||||
|
// columnLabel: "W/D/R", |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2ManufactureDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2ExpiredDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2EnterDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "录入日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2EnterName', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产发料明细", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
}, |
||||
|
], |
||||
|
columnList3:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3RollNo', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "rollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3RollQty', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3ManufactureDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3ExpiredDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3EnterName', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3EnterDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产发料卷明细", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "录入时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
dataRole: { |
||||
|
partTypeDesc: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: 'change' |
||||
|
} |
||||
|
], |
||||
|
partName: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: 'change' |
||||
|
} |
||||
|
], |
||||
|
}, |
||||
|
// 导出 start |
||||
|
exportData: [], |
||||
|
exportName: '生产发料主表'+this.dayjs().format('YYYYMMDDHHmmss'), |
||||
|
exportHeader: ["生产发料主表"], |
||||
|
exportFooter: [], |
||||
|
// 导出 end |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = (window.innerHeight- 260) / 2 |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 1013) { |
||||
|
if(type==23) { |
||||
|
strVal = this.modelData.supplierId |
||||
|
} |
||||
|
} |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 23) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.modelData.supplierId = val.SupplierID |
||||
|
this.modelData.supplierName = val.SupplierName |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
// 每页数 |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
// 当前页 |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
tabClick (tab, event) { |
||||
|
// 刷新列表数据 |
||||
|
this.refreshCurrentTabTable() |
||||
|
}, |
||||
|
changeData(row){ |
||||
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
||||
|
this.headerData=row; |
||||
|
this.refreshCurrentTabTable (); |
||||
|
}, |
||||
|
refreshCurrentTabTable(){ |
||||
|
if(this.currentRow===''||this.currentRow===null){ |
||||
|
this.currentRow={site:'',transNo:''} |
||||
|
} |
||||
|
if(this.activeName==='detail'){ |
||||
|
searchTransDetail(this.currentRow).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList2 = data.rows |
||||
|
|
||||
|
} else { |
||||
|
this.dataList2 = []; |
||||
|
} |
||||
|
}); |
||||
|
}else { |
||||
|
searchTransDetailSub(this.currentRow).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList3 = data.rows |
||||
|
|
||||
|
} else { |
||||
|
this.dataList3 = []; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
searchTable(){ |
||||
|
this.searchData.limit = this.pageSize |
||||
|
this.searchData.page = this.pageIndex |
||||
|
searchTransHeader(this.searchData).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
if(this.dataList.length>0){ |
||||
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
||||
|
this.changeData(this.dataList[0]) |
||||
|
}else { |
||||
|
this.changeData(null) |
||||
|
} |
||||
|
} else { |
||||
|
this.dataList = []; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
addModal(){ |
||||
|
this.getWareHouseList(); |
||||
|
setTimeout(() => { |
||||
|
this.modelData={ |
||||
|
transNo:"0", |
||||
|
site:this.$store.state.user.site, |
||||
|
transDate:new Date(), |
||||
|
warehouseID:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', |
||||
|
receiver:this.$store.state.user.name, |
||||
|
orderRef1:'', |
||||
|
supplierId:'', |
||||
|
supplierName:'', |
||||
|
enterBy:this.$store.state.user.name, |
||||
|
}; |
||||
|
this.modelFlag=true; |
||||
|
},200) |
||||
|
}, |
||||
|
updateModel(row){ |
||||
|
this.getWareHouseList(); |
||||
|
this.modelData={ |
||||
|
transNo:row.transNo, |
||||
|
site:row.site, |
||||
|
transDate:row.transDate, |
||||
|
warehouseID:row.warehouseID, |
||||
|
receiver:row.receiver, |
||||
|
orderRef1:row.orderRef1, |
||||
|
supplierId:row.partnerID, |
||||
|
supplierName:row.partnerName, |
||||
|
enterBy:row.userName, |
||||
|
} |
||||
|
this.modelFlag=true; |
||||
|
}, |
||||
|
deleteData(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteTransHeaderData(row).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.searchTable(); |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
saveHeaderData(){ |
||||
|
if(this.modelData.warehouseID===''){ |
||||
|
this.$alert('请选择仓库!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.modelData.receiver===''){ |
||||
|
this.$alert('请选择经手人!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.modelData.transDate===''){ |
||||
|
this.$alert('请选择发料日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
saveTransHeaderData(this.modelData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
var transNo=data.transNo |
||||
|
this.$message.success( '操作成功') |
||||
|
this.modelFlag = false |
||||
|
this.searchTable() |
||||
|
if(this.jumpFlag){ |
||||
|
this.$nextTick(function () { |
||||
|
setTimeout(() => { |
||||
|
let data={ |
||||
|
site:this.$store.state.user.site, |
||||
|
transNo:transNo, |
||||
|
} |
||||
|
this.addOrUpdateVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.addOrUpdate.init(data) |
||||
|
}) |
||||
|
},500) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWareHouseList(){ |
||||
|
getWareHouseList({site:this.$store.state.user.site}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.wareHouseList=data.rows |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
scanRoll(row){ |
||||
|
let data={ |
||||
|
site:row.site, |
||||
|
transNo:row.transNo, |
||||
|
} |
||||
|
this.addOrUpdateVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.addOrUpdate.init(data) |
||||
|
}) |
||||
|
}, |
||||
|
//导出excel |
||||
|
//导出excel |
||||
|
async createExportData() { |
||||
|
this.searchData.limit = -1 |
||||
|
this.searchData.page = 1 |
||||
|
await searchTransHeader(this.searchData).then(({data}) => { |
||||
|
this.exportList= data.page.list; |
||||
|
}) |
||||
|
|
||||
|
return this.exportList; |
||||
|
}, |
||||
|
startDownload() { |
||||
|
// this.exportData = this.dataList |
||||
|
|
||||
|
}, |
||||
|
finishDownload() { |
||||
|
}, |
||||
|
fields() { |
||||
|
let json = "{" |
||||
|
this.columnList1.forEach((item, index) => { |
||||
|
if (index == this.columnList1.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
|
||||
|
return s |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
793
src/views/modules/material/poReceiving.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,947 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
||||
|
<el-form-item :label="'生产订单'"> |
||||
|
<el-input v-model="searchData.orderRef1" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'入库单日期'"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.startDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="margin-top: 23px;"> |
||||
|
<label style="margin-left: 0px;font-size: 19px">➞</label> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-date-picker |
||||
|
style="width: 120px" |
||||
|
v-model="searchData.endDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-button type="primary" @click="searchTable()">查询</el-button> |
||||
|
<el-button type="primary" @click="addModal()">新增</el-button> |
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
:data="exportData" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:header="exportHeader" |
||||
|
:footer="exportFooter" |
||||
|
:fetch="createExportData" |
||||
|
:before-generate="startDownload" |
||||
|
:before-finish="finishDownload" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ '导出' }} |
||||
|
</download-excel> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
@row-click="changeData" |
||||
|
:height="height" |
||||
|
border |
||||
|
highlight-current-row |
||||
|
ref="mainTable" |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList1" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="150" |
||||
|
fixed="left" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" @click="updateModel(scope.row)">编辑</a> |
||||
|
<a type="text" size="small" @click="deleteData(scope.row)">删除</a> |
||||
|
<a type="text" size="small" @click="scanRoll(scope.row)">扫描</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 1000]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
|
||||
|
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
||||
|
<el-tab-pane label="明细" name="detail"> |
||||
|
<el-table |
||||
|
:data="dataList2" |
||||
|
:height="height" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList2" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-tab-pane> |
||||
|
<el-tab-pane label="卷明细" name="sub"> |
||||
|
<el-table |
||||
|
:data="dataList3" |
||||
|
:height="height" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList3" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-tab-pane> |
||||
|
</el-tabs> |
||||
|
|
||||
|
|
||||
|
<el-dialog title="生产入库-新增" :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="480px" > |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item label="仓库"> |
||||
|
<el-select v-model="modelData.warehouseID" style="width: 100%;"> |
||||
|
<el-option :value="i.wareHouseId" :label="i.wareHouseName" v-for="i in wareHouseList" :key="i.menuId"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="入库日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="modelData.transDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" " > |
||||
|
<el-checkbox v-model="jumpFlag">保存后直接扫描</el-checkbox> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item label="经手人"> |
||||
|
<el-input v-model="modelData.receiver" style="width: 204px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="生产订单"> |
||||
|
<el-input v-model="modelData.orderRef1" style="width: 200px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">--> |
||||
|
<!-- <el-form-item >--> |
||||
|
<!-- <span slot="label" style="" @click="getBaseList(23,1)" ><a herf="#">供应商编码</a></span>--> |
||||
|
<!-- <el-input v-model="modelData.supplierId" style="width: 204px"></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="供应商名称">--> |
||||
|
<!-- <el-input v-model="modelData.supplierName" disabled style="width: 200px"></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- </el-form>--> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="saveHeaderData()">保存</el-button> |
||||
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
|
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="searchTable" v-drag></add-or-update> |
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
searchTransHeader |
||||
|
,searchTransDetail |
||||
|
,searchTransDetailSub |
||||
|
,getWareHouseList |
||||
|
,saveTransHeaderData |
||||
|
,deleteTransHeaderData |
||||
|
} from "@/api/material/productionStock.js" |
||||
|
import { |
||||
|
getLocationListForSearch |
||||
|
} from "@/api/base/normalSearch.js" |
||||
|
import addOrUpdate from './com_productionStock_add_or_update' |
||||
|
import Chooselist from '@/views/modules/common/Chooselist' |
||||
|
export default { |
||||
|
components: { |
||||
|
Chooselist |
||||
|
,addOrUpdate |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
height:200, |
||||
|
modelFlag:false, |
||||
|
activeName: 'detail', |
||||
|
dataList: [], |
||||
|
dataList2: [], |
||||
|
dataList3: [], |
||||
|
addOrUpdateVisible:false, |
||||
|
searchData: { |
||||
|
page: 1, |
||||
|
limit: 100, |
||||
|
site:this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
orderRef1: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
transTypeDb:'SR', |
||||
|
}, |
||||
|
wareHouseList:[], |
||||
|
jumpFlag:true, |
||||
|
modelData:{ |
||||
|
transNo:'', |
||||
|
site:this.$store.state.user.site, |
||||
|
transDate:new Date(), |
||||
|
warehouseID:'', |
||||
|
receiver:'', |
||||
|
orderRef1:'', |
||||
|
supplierId:'', |
||||
|
supplierName:'', |
||||
|
enterBy:'', |
||||
|
}, |
||||
|
exportList:[], |
||||
|
pageIndex: 1, |
||||
|
pageSize: 100, |
||||
|
totalPage: 0, |
||||
|
dataListLoading: false, |
||||
|
currentRow:'', |
||||
|
headerData:'', |
||||
|
columnList1:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransNo', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "transNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "入库单号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransType', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "transType", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "入库类型", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1TransDate', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "transDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "入库日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1WareHouseID', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "warehouseID", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "仓库编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1OrderRef1', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "orderRef1", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "生产订单", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1ReceiverName', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "receiverName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "经手人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1EnterDate', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table1EnterName', |
||||
|
tableId: "200002Table1", |
||||
|
tableName: "生产入库主表", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
columnList2:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2PartNo', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "料号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2PartDesc', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "料号描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2TransQty', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "transQty", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "入库数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2BatchNo', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "batchNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "批号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2LocationID', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "locationID", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "库位", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
// },{ |
||||
|
// userId: this.$store.state.user.name, |
||||
|
// functionId: 200002, |
||||
|
// serialNumber: '200002Table2WdrNo', |
||||
|
// tableId: "200002Table2", |
||||
|
// tableName: "生产入库明细", |
||||
|
// columnProp: "wdrNo", |
||||
|
// headerAlign: "center", |
||||
|
// align: "left", |
||||
|
// columnLabel: "W/D/R", |
||||
|
// columnHidden: false, |
||||
|
// columnImage: false, |
||||
|
// columnSortable: false, |
||||
|
// sortLv: 0, |
||||
|
// status: true, |
||||
|
// fixed: '', |
||||
|
// columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2ManufactureDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2ExpiredDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2EnterDate', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "录入日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table2EnterName', |
||||
|
tableId: "200002Table2", |
||||
|
tableName: "生产入库明细", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 70 |
||||
|
}, |
||||
|
], |
||||
|
columnList3:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3RollNo', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "rollNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "卷号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3RollQty', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "rollQty", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3ManufactureDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "manufactureDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "生产日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3ExpiredDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "expiredDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "失效日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3EnterName', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "enterName", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 200002, |
||||
|
serialNumber: '200002Table3EnterDate', |
||||
|
tableId: "200002Table3", |
||||
|
tableName: "生产入库卷明细", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "录入时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
dataRole: { |
||||
|
partTypeDesc: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: 'change' |
||||
|
} |
||||
|
], |
||||
|
partName: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: 'change' |
||||
|
} |
||||
|
], |
||||
|
}, |
||||
|
// 导出 start |
||||
|
exportData: [], |
||||
|
exportName: '生产入库主表'+this.dayjs().format('YYYYMMDDHHmmss'), |
||||
|
exportHeader: ["生产入库主表"], |
||||
|
exportFooter: [], |
||||
|
// 导出 end |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = (window.innerHeight- 260) / 2 |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 1013) { |
||||
|
if(type==23) { |
||||
|
strVal = this.modelData.supplierId |
||||
|
} |
||||
|
} |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 23) { |
||||
|
if(this.tagNo1==1) { |
||||
|
this.modelData.supplierId = val.SupplierID |
||||
|
this.modelData.supplierName = val.SupplierName |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
// 每页数 |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
// 当前页 |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
tabClick (tab, event) { |
||||
|
// 刷新列表数据 |
||||
|
this.refreshCurrentTabTable() |
||||
|
}, |
||||
|
changeData(row){ |
||||
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
||||
|
this.headerData=row; |
||||
|
this.refreshCurrentTabTable (); |
||||
|
}, |
||||
|
refreshCurrentTabTable(){ |
||||
|
if(this.currentRow===''||this.currentRow===null){ |
||||
|
this.currentRow={site:'',transNo:''} |
||||
|
} |
||||
|
if(this.activeName==='detail'){ |
||||
|
searchTransDetail(this.currentRow).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList2 = data.rows |
||||
|
|
||||
|
} else { |
||||
|
this.dataList2 = []; |
||||
|
} |
||||
|
}); |
||||
|
}else { |
||||
|
searchTransDetailSub(this.currentRow).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList3 = data.rows |
||||
|
|
||||
|
} else { |
||||
|
this.dataList3 = []; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
searchTable(){ |
||||
|
this.searchData.limit = this.pageSize |
||||
|
this.searchData.page = this.pageIndex |
||||
|
searchTransHeader(this.searchData).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
if(this.dataList.length>0){ |
||||
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
||||
|
this.changeData(this.dataList[0]) |
||||
|
}else { |
||||
|
this.changeData(null) |
||||
|
} |
||||
|
} else { |
||||
|
this.dataList = []; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
addModal(){ |
||||
|
this.getWareHouseList(); |
||||
|
setTimeout(() => { |
||||
|
this.modelData={ |
||||
|
transNo:"0", |
||||
|
site:this.$store.state.user.site, |
||||
|
transDate:new Date(), |
||||
|
warehouseID:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', |
||||
|
receiver:this.$store.state.user.name, |
||||
|
orderRef1:'', |
||||
|
supplierId:'', |
||||
|
supplierName:'', |
||||
|
enterBy:this.$store.state.user.name, |
||||
|
}; |
||||
|
this.modelFlag=true; |
||||
|
},200) |
||||
|
}, |
||||
|
updateModel(row){ |
||||
|
this.getWareHouseList(); |
||||
|
this.modelData={ |
||||
|
transNo:row.transNo, |
||||
|
site:row.site, |
||||
|
transDate:row.transDate, |
||||
|
warehouseID:row.warehouseID, |
||||
|
receiver:row.receiver, |
||||
|
orderRef1:row.orderRef1, |
||||
|
supplierId:row.partnerID, |
||||
|
supplierName:row.partnerName, |
||||
|
enterBy:row.userName, |
||||
|
} |
||||
|
this.modelFlag=true; |
||||
|
}, |
||||
|
deleteData(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteTransHeaderData(row).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success( '操作成功') |
||||
|
this.searchTable(); |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
saveHeaderData(){ |
||||
|
if(this.modelData.warehouseID===''){ |
||||
|
this.$alert('请选择仓库!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.modelData.receiver===''){ |
||||
|
this.$alert('请选择经手人!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
if(this.modelData.transDate===''){ |
||||
|
this.$alert('请选择入库日期!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
saveTransHeaderData(this.modelData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
var transNo=data.transNo |
||||
|
this.$message.success( '操作成功') |
||||
|
this.modelFlag = false |
||||
|
this.searchTable() |
||||
|
if(this.jumpFlag){ |
||||
|
this.$nextTick(function () { |
||||
|
setTimeout(() => { |
||||
|
let data={ |
||||
|
site:this.$store.state.user.site, |
||||
|
transNo:transNo, |
||||
|
} |
||||
|
this.addOrUpdateVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.addOrUpdate.init(data) |
||||
|
}) |
||||
|
},500) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWareHouseList(){ |
||||
|
getWareHouseList({site:this.$store.state.user.site}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.wareHouseList=data.rows |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
scanRoll(row){ |
||||
|
let data={ |
||||
|
site:row.site, |
||||
|
transNo:row.transNo, |
||||
|
} |
||||
|
this.addOrUpdateVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.addOrUpdate.init(data) |
||||
|
}) |
||||
|
}, |
||||
|
//导出excel |
||||
|
//导出excel |
||||
|
async createExportData() { |
||||
|
this.searchData.limit = -1 |
||||
|
this.searchData.page = 1 |
||||
|
await searchTransHeader(this.searchData).then(({data}) => { |
||||
|
this.exportList= data.page.list; |
||||
|
}) |
||||
|
|
||||
|
return this.exportList; |
||||
|
}, |
||||
|
startDownload() { |
||||
|
// this.exportData = this.dataList |
||||
|
|
||||
|
}, |
||||
|
finishDownload() { |
||||
|
}, |
||||
|
fields() { |
||||
|
let json = "{" |
||||
|
this.columnList1.forEach((item, index) => { |
||||
|
if (index == this.columnList1.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
|
||||
|
return s |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,593 @@ |
|||||
|
<script> |
||||
|
import { |
||||
|
deleteData, |
||||
|
editData, |
||||
|
getDataList, |
||||
|
getDataPageList, getIFSDataList, |
||||
|
getPartDataList, |
||||
|
saveData |
||||
|
} from '../../../api/production/shopOrder' |
||||
|
import dayjs from "dayjs"; |
||||
|
export default { |
||||
|
name: 'order', |
||||
|
props:{ |
||||
|
height:{ |
||||
|
type:Number, |
||||
|
default:500 |
||||
|
} |
||||
|
}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
open:false, |
||||
|
loading:true, |
||||
|
queryForm:{ |
||||
|
orderNo: '', |
||||
|
partNo: '', |
||||
|
startDate:'', |
||||
|
endDate:'' |
||||
|
}, |
||||
|
no:1, |
||||
|
size:50, |
||||
|
total:0, |
||||
|
form:{}, |
||||
|
rules:{ |
||||
|
orderNo: [{ required: true, message: '请输入订单号', trigger: 'blur' }], |
||||
|
partNo: [{ required: true, message: '请输入产品编码', trigger: 'blur' }], |
||||
|
partDesc: [{ required: true, message: '请输入产品描述', trigger: 'blur' }], |
||||
|
lotSize: [{ required: true, message: '请输入订单数量', trigger: 'blur' }], |
||||
|
planStartDate: [{ required: true, message: '请选择订单日期', trigger: 'blur' }], |
||||
|
}, |
||||
|
dataList:[], |
||||
|
|
||||
|
columnList:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TableOrderNo', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "orderNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "订单号", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TablePlanStartDate', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "planStartDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "订单日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TablePartNo', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "partNo", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "产品编码", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TablePartDesc', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "partDesc", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "产品描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TableLotSize', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "lotSize", |
||||
|
headerAlign: "center", |
||||
|
align: "right", |
||||
|
columnLabel: "订单数量", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TableStatus', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "status", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TableUserName', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "username", |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: "录入人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
},{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 300001, |
||||
|
serialNumber: '300001TableEnterDate', |
||||
|
tableId: "300001Table", |
||||
|
tableName: "ShopOrder", |
||||
|
columnProp: "enterDate", |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: "录入时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
partOpen:false, |
||||
|
partForm: { |
||||
|
partNo: '', |
||||
|
partDesc: '', |
||||
|
}, |
||||
|
partDataList:[], |
||||
|
|
||||
|
importOpen:false, |
||||
|
importDataList:[], |
||||
|
importForm:{ |
||||
|
orderNo: '', |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
getList(){ |
||||
|
let params = { |
||||
|
...this.queryForm, |
||||
|
site:this.$store.state.user.site, |
||||
|
no:this.no, |
||||
|
size:this.size |
||||
|
} |
||||
|
this.loading = true |
||||
|
getDataPageList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.dataList = data.rows.records |
||||
|
this.total = data.rows.total |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
this.loading = false |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
handleSizeChange(val){ |
||||
|
this.size = val |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleCurrentChange(val){ |
||||
|
this.no = val |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleQuery(){ |
||||
|
this.no = 1; |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleAdd(){ |
||||
|
this.form={ |
||||
|
orderNo:'', |
||||
|
partNo:'', |
||||
|
partDesc:'', |
||||
|
lotSize:'', |
||||
|
planStartDate:'', |
||||
|
status:'', |
||||
|
remark:'', |
||||
|
} |
||||
|
this.open = true; |
||||
|
}, |
||||
|
handleEdit(row){ |
||||
|
this.form={...row} |
||||
|
this.open = true; |
||||
|
}, |
||||
|
handleDelete(row){ |
||||
|
this.$confirm('确定要删除这条数据?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteData(row).then(({data}) => { |
||||
|
if (data && data.code === 0){ |
||||
|
this.handleQuery(); |
||||
|
this.$message.success(data.msg) |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
handleSave(){ |
||||
|
this.$refs.form.validate((valid,obj) => { |
||||
|
if (valid){ |
||||
|
if (!this.form.site){ |
||||
|
// 新增 |
||||
|
let params = { |
||||
|
...this.form, |
||||
|
site:this.$store.state.user.site, |
||||
|
username:this.$store.state.user.name, |
||||
|
enterDate:dayjs().format('YYYY-MM-DD HH:mm:ss') |
||||
|
} |
||||
|
saveData(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.getList(); |
||||
|
this.open = false; |
||||
|
this.$message.success(data.msg) |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}else { |
||||
|
// 修改 |
||||
|
editData(this.form).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.getList(); |
||||
|
this.open = false; |
||||
|
this.$message.success(data.msg) |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
} |
||||
|
}else { |
||||
|
let i = 0; |
||||
|
Object.keys(obj).forEach(key => { |
||||
|
if (i === 0){ |
||||
|
this.$message.warning(obj[key][0].message) |
||||
|
return |
||||
|
} |
||||
|
i++; |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleQueryPart(){ |
||||
|
this.partOpen = true; |
||||
|
let params = { |
||||
|
...this.partForm, |
||||
|
site:this.$store.state.user.site, |
||||
|
} |
||||
|
this.partDataList = [] |
||||
|
getPartDataList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.partDataList = data.rows |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
partRowClick(row){ |
||||
|
this.form.partNo = row.partNo |
||||
|
this.form.partDesc = row.partDesc |
||||
|
this.partOpen = false |
||||
|
}, |
||||
|
ifsOrderRowClick(row){ |
||||
|
this.form.orderNo = row.orderNo |
||||
|
this.form.partNo = row.partNo |
||||
|
this.form.partDesc = row.partDesc |
||||
|
this.form.lotSize = row.lotSize |
||||
|
this.form.planStartDate = row.planStartDate |
||||
|
this.importOpen = false |
||||
|
}, |
||||
|
handleValidatePart(){ |
||||
|
let params = { |
||||
|
partNo: this.form.partNo, |
||||
|
site: this.$store.state.user.site, |
||||
|
} |
||||
|
getPartDataList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
if (data.rows.length === 1){ |
||||
|
this.partRowClick(data.rows[0]) |
||||
|
} |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
handleImportIFS(){ |
||||
|
this.importOpen = true; |
||||
|
let params = { |
||||
|
...this.importForm, |
||||
|
site: this.$store.state.user.site, |
||||
|
} |
||||
|
getIFSDataList(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.importDataList = data.rows |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
watch:{ |
||||
|
'form.partNo'(newVal,oldVal){ |
||||
|
if (newVal){ |
||||
|
this.partForm.partNo = newVal.toUpperCase() |
||||
|
this.partForm.partNo = this.form.partNo |
||||
|
} |
||||
|
}, |
||||
|
'form.orderNo'(newVal,oldVal){ |
||||
|
if (newVal){ |
||||
|
this.form.orderNo = newVal.toUpperCase() |
||||
|
} |
||||
|
}, |
||||
|
'queryForm.partNo'(newVal,oldVal){ |
||||
|
if (newVal){ |
||||
|
this.queryForm.partNo = newVal.toUpperCase() |
||||
|
} |
||||
|
}, |
||||
|
'queryForm.orderNo'(newVal,oldVal){ |
||||
|
if (newVal){ |
||||
|
this.queryForm.orderNo = newVal.toUpperCase() |
||||
|
} |
||||
|
}, |
||||
|
'importForm.orderNo'(newVal,oldVal){ |
||||
|
if (newVal) { |
||||
|
this.importForm.orderNo = newVal.toUpperCase() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<div style="width: 1100px"> |
||||
|
<el-form label-position="top" :model="queryForm" ref="queryForm"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="订单号"> |
||||
|
<el-input v-model="queryForm.orderNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="物料编码"> |
||||
|
<el-input v-model="queryForm.partNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="7"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="11"> |
||||
|
<el-form-item label="订单日期"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="queryForm.startDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="2"> |
||||
|
<el-form-item label=" "> |
||||
|
<label style="margin-left: 0px;font-size: 19px">➞</label> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="11"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="queryForm.endDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="handleQuery">查询</el-button> |
||||
|
<el-button type="primary" @click="handleAdd">新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<el-table :data="dataList" border :height="height" v-loading="loading"> |
||||
|
<el-table-column label="操作" align="center" width="80"> |
||||
|
<template slot-scope="{row,$index}"> |
||||
|
<el-link @click="handleEdit(row)">编辑</el-link> |
||||
|
<el-link @click="handleDelete(row)">删除</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page="no" |
||||
|
:page-sizes="[50, 100, 1000]" |
||||
|
:page-size="size" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
<el-dialog title="订单详情" :close-on-click-modal="false" v-drag :visible.sync="open" width="500px"> |
||||
|
<el-form :model="form" ref="form" label-position="top" :rules="rules"> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="订单号" prop="orderNo" :show-message="false"> |
||||
|
<el-input v-model="form.orderNo" :disabled="form.site"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item label=" " > |
||||
|
<el-button v-if="!form.site" type="primary" @click="handleImportIFS">从IFS导入</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="10"> |
||||
|
<el-col :span="10"> |
||||
|
<el-form-item label="产品编码" prop="partNo" :show-message="false"> |
||||
|
<span slot="label" style="" @click="handleQueryPart" ><a herf="#">产品编码</a></span> |
||||
|
<el-input v-model="form.partNo" @change="handleValidatePart"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="14"> |
||||
|
<el-form-item label="产品名称" prop="partDesc" :show-message="false"> |
||||
|
<el-input v-model="form.partDesc" disabled></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8" > |
||||
|
<el-form-item label="订单日期" prop="planStartDate" :show-message="false"> |
||||
|
<el-date-picker |
||||
|
style="width: 100%" |
||||
|
v-model="form.planStartDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="14" :offset="2"> |
||||
|
<el-form-item label="订单数量" prop="lotSize" :show-message="false"> |
||||
|
<el-input-number :min="0" :controls="false" :step="0" v-model="form.lotSize"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item label="备注" prop="remark" :show-message="false"> |
||||
|
<el-input v-model="form.remark"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-footer style="height:30px;text-align:center"> |
||||
|
<el-button type="primary" @click="handleSave">保存</el-button> |
||||
|
<el-button type="primary" @click="open = false">取 消</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<el-dialog :title="`产品信息`" v-drag :visible.sync="partOpen" :close-on-click-modal="false" width="500px"> |
||||
|
<el-form :model="partForm" :inline="true" ref="partForm" label-position="top"> |
||||
|
<el-form-item label="产品编码" prop="partNo"> |
||||
|
<el-input v-model="partForm.partNo"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产品名称" prop="partDesc"> |
||||
|
<el-input v-model="partForm.partDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" " > |
||||
|
<el-button type="primary" @click="handleQueryPart">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table :data="partDataList" border height="300" @row-dblclick="partRowClick"> |
||||
|
<el-table-column label="产品编码" prop="partNo"></el-table-column> |
||||
|
<el-table-column label="产品名称" prop="partDesc"></el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<el-dialog :title="`IFS订单`" v-drag :visible.sync="importOpen" :close-on-click-modal="false" width="600px"> |
||||
|
<el-form :model="importForm" :inline="true" ref="importForm" label-position="top"> |
||||
|
<el-form-item label="订单号"> |
||||
|
<el-input v-model="importForm.orderNo"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="handleImportIFS">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table :data="importDataList" border height="300" @row-dblclick="ifsOrderRowClick"> |
||||
|
<el-table-column label="订单号" prop="orderNo"></el-table-column> |
||||
|
<el-table-column label="产品编码" prop="partNo"></el-table-column> |
||||
|
<el-table-column label="产品名称" prop="partDesc"></el-table-column> |
||||
|
<el-table-column label="订单数量" prop="lotSize"></el-table-column> |
||||
|
<el-table-column label="订单日期" prop="planStartDate"></el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue