Browse Source

20250325

master
qiezi 10 months ago
parent
commit
7981effc6a
  1. 25
      src/views/modules/pallet/index.vue

25
src/views/modules/pallet/index.vue

@ -42,7 +42,7 @@ export default {
columnProp: "palletNo", columnProp: "palletNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "Pallet Label",
columnLabel: "Pallet No",
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -173,7 +173,7 @@ export default {
}) })
}, },
handleRemoveById(row){ handleRemoveById(row){
this.$confirm(`Are you sure you want to remove Pallet Label?`, 'Tips', {
this.$confirm(`Are you sure you want to remove SN?`, 'Tips', {
confirmButtonText: 'Yes', confirmButtonText: 'Yes',
cancelButtonText: 'No', cancelButtonText: 'No',
type: 'warning' type: 'warning'
@ -197,7 +197,7 @@ export default {
}) })
}, },
handleRemoveAll(){ handleRemoveAll(){
this.$confirm(`Are you sure you want to remove Pallet Label?`, 'Tips', {
this.$confirm(`Are you sure you want to remove All Pallet?`, 'Tips', {
confirmButtonText: 'Yes', confirmButtonText: 'Yes',
cancelButtonText: 'No', cancelButtonText: 'No',
type: 'warning' type: 'warning'
@ -220,7 +220,7 @@ export default {
}, },
handleExport(){ handleExport(){
if (this.dataList.length === 0){ if (this.dataList.length === 0){
this.$message.warning('Pallet Label data does not exist')
this.$message.warning('Pallet data does not exist')
return return
} }
let params = { let params = {
@ -236,7 +236,7 @@ export default {
// //
//const contentDisposition = response.headers['content-disposition']; //const contentDisposition = response.headers['content-disposition'];
//const fileName = contentDisposition ? decodeURIComponent(contentDisposition.split('filename*=utf-8')[1]) : 'pallet_data.xlsx'; //const fileName = contentDisposition ? decodeURIComponent(contentDisposition.split('filename*=utf-8')[1]) : 'pallet_data.xlsx';
a.download = "Pallet Label.xlsx";
a.download = "Pallet.xlsx";
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
document.body.removeChild(a); document.body.removeChild(a);
@ -284,12 +284,12 @@ export default {
}, },
handleScanBatchPallet(){ handleScanBatchPallet(){
if (!this.batchParams.palletNo || this.batchParams.palletNo.trim().length === 0){ if (!this.batchParams.palletNo || this.batchParams.palletNo.trim().length === 0){
this.$message.warning('please input Pallet Label')
this.$message.warning('please input Pallet No')
return return
} }
if (this.palletList.some(item=>item.palletNo === this.batchParams.palletNo)){ if (this.palletList.some(item=>item.palletNo === this.batchParams.palletNo)){
this.batchParams.palletNo = '' this.batchParams.palletNo = ''
this.$message.warning('The Pallet Label already exists')
this.$message.warning('The Pallet No already exists')
return return
} }
let params = { let params = {
@ -308,7 +308,7 @@ export default {
}, },
saveBatchPallet(){ saveBatchPallet(){
if (this.palletList.length === 0){ if (this.palletList.length === 0){
this.$message.warning('please scan Pallet Label')
this.$message.warning('please Scan Pallet No')
return return
} }
this.saveLoading = true; this.saveLoading = true;
@ -334,6 +334,7 @@ export default {
batchVisible(newVal,oldVal){ batchVisible(newVal,oldVal){
if (newVal === false){ if (newVal === false){
this.palletList = []; this.palletList = [];
this.batchParams.palletNo = ''
this.$refs.scanPallet.focus() this.$refs.scanPallet.focus()
} }
}, },
@ -364,7 +365,7 @@ export default {
<el-form label-position="top" :model="queryParams" @submit.native.prevent> <el-form label-position="top" :model="queryParams" @submit.native.prevent>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="span+1"> <el-col :span="span+1">
<el-input ref="scanPallet" v-model="queryParams.palletNo" @keydown.enter.native="handleScanPallet" placeholder="Please scan Pallet Label"></el-input>
<el-input ref="scanPallet" v-model="queryParams.palletNo" @keydown.enter.native="handleScanPallet" placeholder="Please Scan Pallet No"></el-input>
</el-col> </el-col>
<el-col :span="span*3"> <el-col :span="span*3">
<el-button type="primary" @click="handleBatchProcessing">Batch Processing</el-button> <el-button type="primary" @click="handleBatchProcessing">Batch Processing</el-button>
@ -425,10 +426,10 @@ export default {
</el-pagination> </el-pagination>
</div> </div>
<el-dialog :visible.sync="batchVisible" v-drag title="Batch Processing - Add" width="500px" :close-on-click-modal="false">
<el-dialog :visible.sync="batchVisible" v-drag title="Batch Processing" width="500px" :close-on-click-modal="false">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="batchParams.palletNo" ref="batchPalletNo" placeholder="Please scan Pallet Label" @keydown.enter.native="handleScanBatchPallet"></el-input>
<el-input v-model="batchParams.palletNo" ref="batchPalletNo" placeholder="Please Scan Pallet No" @keydown.enter.native="handleScanBatchPallet"></el-input>
</el-col> </el-col>
<el-col :span="6" style="text-align:right;font-weight: bold"> <el-col :span="6" style="text-align:right;font-weight: bold">
Pallet Qty:<span>{{palletList.length}}</span> Pallet Qty:<span>{{palletList.length}}</span>
@ -440,7 +441,7 @@ export default {
<a @click="removePalletList(scope.$index)">Delete</a> <a @click="removePalletList(scope.$index)">Delete</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="Pallet Label" prop="palletNo"></el-table-column>
<el-table-column align="center" label="Pallet No" prop="palletNo"></el-table-column>
</el-table> </el-table>
<div slot="footer"> <div slot="footer">
<el-button type="primary" :loading="saveLoading" @click="saveBatchPallet">Save</el-button> <el-button type="primary" :loading="saveLoading" @click="saveBatchPallet">Save</el-button>

Loading…
Cancel
Save