|
@@ -5,24 +5,21 @@
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
<h1 style="margin: 0%;margin-bottom: 10px;">出库报工</h1>
|
|
<h1 style="margin: 0%;margin-bottom: 10px;">出库报工</h1>
|
|
|
<el-row :gutter="24" style="margin-bottom: 20px;">
|
|
<el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-input v-model="add_searchInfo" placeholder="扫描订单编号获取订单信息"
|
|
|
|
|
- @keyup.enter="add_onSubmit"
|
|
|
|
|
- id="searchInput"
|
|
|
|
|
- style="width: 230px;margin: 5px;height: 50px;">
|
|
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <el-input v-model="add_searchInfo" placeholder="扫描订单编号获取订单信息" @keyup.enter="add_onSubmit"id="searchInput" style="width: 230px;margin: 5px;height: 50px;"></el-input>
|
|
|
<el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
|
|
<el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
|
|
|
|
|
+ <!-- <el-button type="primary" icon="" @click="Restore_onSubmit" style="margin: 5px;height: 50px;">恢复未出库</el-button> -->
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</div>
|
|
</div>
|
|
|
</layout-header>
|
|
</layout-header>
|
|
|
<layout>
|
|
<layout>
|
|
|
<layout-content >
|
|
<layout-content >
|
|
|
- <el-main>
|
|
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
<el-table ref="multipleTable" style="width: 100%;height: 55vh" tooltip-effect="dark"
|
|
<el-table ref="multipleTable" style="width: 100%;height: 55vh" tooltip-effect="dark"
|
|
|
:row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
:row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:data="add_tableData" border row-key="ID"
|
|
:data="add_tableData" border row-key="ID"
|
|
|
- size="small"
|
|
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :cell-class-name="tableDataCellClass"
|
|
|
highlight-current-row="true" @row-dblclick="add_updateCompanyFunc"
|
|
highlight-current-row="true" @row-dblclick="add_updateCompanyFunc"
|
|
|
@row-click="add_tableRowClick" :show-overflow-tooltip="true"
|
|
@row-click="add_tableRowClick" :show-overflow-tooltip="true"
|
|
|
@selection-change="handleSelectionChange">
|
|
@selection-change="handleSelectionChange">
|
|
@@ -35,10 +32,9 @@
|
|
|
<el-table-column sortable align="left" label="是否出库" prop="是否出库" width="200"/>
|
|
<el-table-column sortable align="left" label="是否出库" prop="是否出库" width="200"/>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
|
|
<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
|
|
|
- <el-button type="primary" @click="add_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认出库</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="add_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认出库</el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-main>
|
|
|
|
|
</layout-content>
|
|
</layout-content>
|
|
|
</layout>
|
|
</layout>
|
|
|
</layout>
|
|
</layout>
|
|
@@ -67,6 +63,8 @@ const currentDates = `${year}-${month}-${day}`;
|
|
|
const add_searchInfo = ref('')
|
|
const add_searchInfo = ref('')
|
|
|
const add_tableData = reactive([])
|
|
const add_tableData = reactive([])
|
|
|
|
|
|
|
|
|
|
+//searcs = ref(1) 第一次扫代表查数据
|
|
|
|
|
+const searcs = ref('')
|
|
|
//点击【查询】按钮
|
|
//点击【查询】按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
const add_onSubmit = async ()=>{
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
@@ -74,12 +72,43 @@ const add_onSubmit = async ()=>{
|
|
|
add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
ElMessage({type: 'warning',message: '搜索内容不能为空' })
|
|
ElMessage({type: 'warning',message: '搜索内容不能为空' })
|
|
|
}else{
|
|
}else{
|
|
|
- const order =add_searchInfo.value;
|
|
|
|
|
- const getSpotLists = await getSpotList({order:order,code:'出库'});
|
|
|
|
|
- console.log(getSpotLists)
|
|
|
|
|
- add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);//表格数据
|
|
|
|
|
|
|
+ if (add_searchInfo.value.includes('-')) {
|
|
|
|
|
+ if(searcs.value === ''){
|
|
|
|
|
+ console.log("查询")
|
|
|
|
|
+ const order = add_searchInfo.value;
|
|
|
|
|
+ const getSpotLists = await getSpotList({order:order,code:'出库'});
|
|
|
|
|
+ console.log(getSpotLists)
|
|
|
|
|
+ add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);//表格数据
|
|
|
|
|
+ searcs.value = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const order =add_searchInfo.value;
|
|
|
|
|
+ console.log('出库')
|
|
|
|
|
+ let params = {}
|
|
|
|
|
+ params.order_id = add_searchInfo.value;
|
|
|
|
|
+ params.code_ck_rq = currentDates;
|
|
|
|
|
+ console.log(params)
|
|
|
|
|
+ const ck_gettab = await getSpotTab(params);
|
|
|
|
|
+ if (ck_gettab.code === 0) {
|
|
|
|
|
+ searcs.value = '';
|
|
|
|
|
+ ElMessage({type: 'success',message: '出库成功'});
|
|
|
|
|
+ add_searchInfo.value = ''
|
|
|
|
|
+ const getSpotLists = await getSpotList({order:order,code:'出库'});
|
|
|
|
|
+ console.log(getSpotLists)
|
|
|
|
|
+ add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);//表格数据
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log("查询")
|
|
|
|
|
+ const order = add_searchInfo.value;
|
|
|
|
|
+ const getSpotLists = await getSpotList({order:order,code:'出库'});
|
|
|
|
|
+ console.log(getSpotLists)
|
|
|
|
|
+ add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);//表格数据
|
|
|
|
|
+ searcs.value = '';
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // add_searchInfo.value = '';
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
const inputElement = document.querySelector('#searchInput');
|
|
const inputElement = document.querySelector('#searchInput');
|
|
|
if (inputElement) {
|
|
if (inputElement) {
|
|
@@ -89,6 +118,15 @@ const add_onSubmit = async ()=>{
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const Restore_onSubmit = async ()=>{
|
|
|
|
|
+ if(add_searchInfo.value === '' || add_searchInfo.value === null){
|
|
|
|
|
+ ElMessage({type: 'warning',message: '请扫描恢复的子订单' })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // add_searchInfo.value
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//复选框选择
|
|
//复选框选择
|
|
|
const ckSelection = ref('')
|
|
const ckSelection = ref('')
|
|
|
const handleSelectionChange = (selection, type) => {
|
|
const handleSelectionChange = (selection, type) => {
|
|
@@ -139,8 +177,25 @@ const handleSizeChange = (val) => {
|
|
|
_getStaffList();
|
|
_getStaffList();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+//根据出库状态文字颜色
|
|
|
|
|
+const tableDataCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
|
|
+ if(row['是否出库'] === '已出库'){
|
|
|
|
|
+ return 'status-plan-usage-low';
|
|
|
|
|
+ }
|
|
|
|
|
+ if(row['是否出库'] === '未出库'){
|
|
|
|
|
+ return 'statusy-plan-usage-low';
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
+
|
|
|
|
|
+:deep(.status-plan-usage-low div) {
|
|
|
|
|
+ color: #8c939d !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.statusy-plan-usage-low div) {
|
|
|
|
|
+ color: blue !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.form-container {
|
|
.form-container {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|