前端上线代码优化

This commit is contained in:
zhouzy062 2024-04-08 09:01:54 +08:00
parent 4a5d3f299d
commit 2c9bf10d8f
8 changed files with 65 additions and 75 deletions

View File

@ -1,7 +1,7 @@
// const qrUrl = 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='; //测试 // const qrUrl = 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='; //测试
// const qrUrl = 'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode='; //重庆 const qrUrl = 'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode='; //重庆
const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏 // const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏
// const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网 // const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网

View File

@ -264,7 +264,7 @@ export default {
if(isView){ if(isView){
this.isView = true this.isView = true
} }
console.log(isView) // console.log(isView)
if(taskId){ if(taskId){
this.getData(taskId) this.getData(taskId)
} }
@ -276,7 +276,7 @@ export default {
}, },
// //
async subAuditLeaseByCompany(type){ async subAuditLeaseByCompany(type){
console.log() // console.log()
const params = JSON.parse(JSON.stringify(this.queryParams)) const params = JSON.parse(JSON.stringify(this.queryParams))
if(params.taskStatus==31){ if(params.taskStatus==31){
params.taskStatus = 32 params.taskStatus = 32
@ -292,18 +292,18 @@ export default {
}) })
params.updateTime = params.updateTimes params.updateTime = params.updateTimes
params.createTime = params.createTimes params.createTime = params.createTimes
console.log(params) // console.log(params)
const res = await auditLeaseByCompanyCq(params) const res = await auditLeaseByCompanyCq(params)
if(res.code == 200){ if(res.code == 200){
this.examineVisible = false this.examineVisible = false
this.$tab.closeOpenPage({ path: "/claimAndRefund/receiveByCq/receiveManage"}); this.$tab.closeOpenPage({ path: "/claimAndRefund/receiveByCq/receiveManage"});
} }
console.log('subAuditLeaseByCompany ==================',res) // console.log('subAuditLeaseByCompany ==================',res)
}, },
// //
confirm(){ confirm(){
const taskData = JSON.parse(JSON.stringify(this.queryParams)) const taskData = JSON.parse(JSON.stringify(this.queryParams))
console.log(taskData) // console.log(taskData)
let param = { let param = {
taskId:taskData.taskId, taskId:taskData.taskId,
taskStatus:33 taskStatus:33
@ -338,13 +338,13 @@ export default {
this.$set(v,'examineStatusId',Number(params.examineStatusId)) this.$set(v,'examineStatusId',Number(params.examineStatusId))
this.$set(v,'status',type) this.$set(v,'status',type)
}) })
console.log(params) // console.log(params)
const res = await rejectLeaseByCompanyCq(params) const res = await rejectLeaseByCompanyCq(params)
if(res.code == 200){ if(res.code == 200){
this.examineVisible = false this.examineVisible = false
this.$tab.closeOpenPage({ path: "/claimAndRefund/receiveByCq/receiveManage"}); this.$tab.closeOpenPage({ path: "/claimAndRefund/receiveByCq/receiveManage"});
} }
console.log('subAuditLeaseByCompany ==================',res) // console.log('subAuditLeaseByCompany ==================',res)
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleBack(row) { handleBack(row) {

View File

@ -78,7 +78,7 @@
<el-input <el-input
v-model="queryParams.phone" v-model="queryParams.phone"
placeholder="请输入退料人电话" placeholder="请输入退料人电话"
clearable clearable maxlength="11"
style="width: 240px" style="width: 240px"
/> />
</el-form-item> </el-form-item>

View File

@ -16,7 +16,7 @@
}, },
methods: { methods: {
openNewWindow() { openNewWindow() {
window.open('http://112.29.103.165:21624/index01.html?token='+localStorage.getItem('token'), '_blank'); window.open('http://112.29.103.165:21626/index01.html?token='+localStorage.getItem('token'), '_blank');
} }
} }
}; };

View File

@ -203,14 +203,14 @@
prop="typeName" prop="typeName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="设备编码" align="center" prop="maCode" /> <el-table-column label="设备编码" align="center" prop="maCode" width="180"/>
<el-table-column <el-table-column
label="绑定人员" label="绑定人员"
align="center" align="center"
prop="userName" prop="userName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="绑定时间" align="center" prop="bindTime" /> <el-table-column label="绑定时间" align="center" prop="bindTime" width="150"/>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -88,10 +88,10 @@
<el-table-column label="物品种类" align="center" prop="kindName" :show-overflow-tooltip="true"/> <el-table-column label="物品种类" align="center" prop="kindName" :show-overflow-tooltip="true"/>
<el-table-column label="物品名称" align="center" prop="modelName" /> <el-table-column label="物品名称" align="center" prop="modelName" />
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" /> <el-table-column label="设备编码" align="center" prop="maCode" width="190"/>
<el-table-column label="绑定人员" align="center" prop="userName" :show-overflow-tooltip="true"/> <el-table-column label="绑定人员" align="center" prop="userName" :show-overflow-tooltip="true"/>
<el-table-column label="操作人员" align="center" prop="userName" /> <el-table-column label="操作人员" align="center" prop="userName" />
<el-table-column label="绑定时间" align="center" prop="bindTime" /> <el-table-column label="绑定时间" align="center" prop="bindTime" width="150"/>
<el-table-column label="操作类型" align="center" prop="status"> <el-table-column label="操作类型" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status == 0 ? '停用' : '正常' }} {{ scope.row.status == 0 ? '停用' : '正常' }}

View File

@ -76,7 +76,6 @@
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-edit"
v-if="scope.row.bindNum<scope.row.checkNum" v-if="scope.row.bindNum<scope.row.checkNum"
@click="handleCode(scope.row)" @click="handleCode(scope.row)"
>绑定编码</el-button> >绑定编码</el-button>
@ -335,7 +334,15 @@ export default {
// this.$set(this.form,'fixCode','1') // this.$set(this.form,'fixCode','1')
let arr = this.form.arrivalTime.split('-') let arr = this.form.arrivalTime.split('-')
// this.form.exCode = ; // this.form.exCode = ;
// this.form.typeCode=111
if(!this.form.typeCode){
this.form.typeCode=''
}
if(!this.form.specsCode){
this.form.specsCode=''
}
this.$set(this.form,'exCode','NSJJ'+this.form.typeCode+this.form.specsCode+arr[0][2]+arr[0][3]+arr[1]) this.$set(this.form,'exCode','NSJJ'+this.form.typeCode+this.form.specsCode+arr[0][2]+arr[0][3]+arr[1])
this.form.count = row.checkNum; this.form.count = row.checkNum;
this.codeList=[] this.codeList=[]
this.open = true; this.open = true;

View File

@ -10,7 +10,21 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择设备类型"
clearable filterable
style="width: 240px"
>
<el-option
v-for="typeItem in typesList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -34,14 +48,14 @@
<el-table v-loading="loading" :data="tableList" > <el-table v-loading="loading" :data="tableList" >
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" width="55px"/> <el-table-column label="序号" align="center" type="index" width="55px"/>
<el-table-column label="采购单号" align="center" prop="code" :show-overflow-tooltip="true" /> <el-table-column label="采购单号" align="center" prop="code" :show-overflow-tooltip="true" width="160"/>
<el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" /> <el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" /> <el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="采购机具设备" align="center" prop="purchasingTypeName" :show-overflow-tooltip="true" width="250"/> <el-table-column label="采购机具设备" align="center" prop="purchasingTypeName" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" width="100"/> <el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="入库人员" align="center" prop="updateBy" :show-overflow-tooltip="true" width="100"/> <el-table-column label="入库人员" align="center" prop="updateBy" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="入库时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/> <el-table-column label="入库时间" align="center" prop="updateTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="发布时间" align="center" prop="createTime" :show-overflow-tooltip="true"/> <el-table-column label="发布时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="taskStatus"> <el-table-column label="状态" align="center" prop="taskStatus">
<template slot-scope="scope"> <template slot-scope="scope">
@ -74,13 +88,6 @@
v-if="scope.row.taskStatus=='28'" v-if="scope.row.taskStatus=='28'"
@click="handlePrint(scope.row)" @click="handlePrint(scope.row)"
>入库单</el-button> >入库单</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:dict:remove']"-->
<!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -148,7 +155,12 @@
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" /> <el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="checkNum" :show-overflow-tooltip="true" /> <el-table-column label="数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
<el-table-column label="编号" align="center" prop="maCode" :show-overflow-tooltip="true" width="200"/> <el-table-column label="编号" align="center" prop="maCode" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="管理模式" align="center" prop="manageType">
<template slot-scope="scope">
<span v-if="scope.row.manageType=='0'">编码管理</span>
<span v-if="scope.row.manageType=='1'">数量管理</span>
</template>
</el-table-column>
<el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" /> <el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
@ -159,7 +171,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle" width="150"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle" width="150">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.manageType=='1'||(scope.row.manageType=='0'&&scope.row.maCode)">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -259,13 +271,12 @@
</template> </template>
<script> <script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; import { getTypeList } from "@/api/store/warehousing";
import { getRepairedDetailList, inputByType } from "@/api/store/warehousing";
import { getPutInList,getPutinDetailsList ,changePutinStatus,warehousingEntry} from "@/api/store/newBuy"; import { getPutInList,getPutinDetailsList ,changePutinStatus,warehousingEntry} from "@/api/store/newBuy";
import vueEasyPrint from 'vue-easy-print'; import vueEasyPrint from 'vue-easy-print';
export default { export default {
// name: "NewDevicesWarehousing", // name: "NewDevicesWarehousing",
dicts: ['sys_normal_disable'], // dicts: ['sys_normal_disable'],
components:{vueEasyPrint}, components:{vueEasyPrint},
data() { data() {
return { return {
@ -284,7 +295,7 @@ export default {
// //
dialogTotal: 0, dialogTotal: 0,
// //
typeList: [], typesList: [],
modelList: [], modelList: [],
// //
tableList: [], tableList: [],
@ -325,10 +336,16 @@ export default {
}; };
}, },
created() { created() {
this.getTypeList();
this.getList(); this.getList();
}, },
methods: { methods: {
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typesList = response.data;
}
);
},
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -385,10 +402,14 @@ export default {
selectable(row){ selectable(row){
console.log(row) console.log(row)
if(row.status=='0'){ if(row.status=='0'){
if((row.manageType=='0'&&row.maCode)||row.manageType=='1'){
return true return true
}else{ }else{
return false return false
} }
}else{
return false
}
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -513,26 +534,6 @@ export default {
} }
}); });
}, },
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
// //
handleView(row) { handleView(row) {
this.query.taskId = row.taskId this.query.taskId = row.taskId
@ -560,30 +561,12 @@ export default {
print(){ print(){
this.$refs.remarksPrintRef.print(); this.$refs.remarksPrintRef.print();
}, },
/** 删除按钮操作 */
handleDelete(row) {
const dictIds = row.dictId || this.ids;
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
return delType(dictIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('material/purchaseCheckInfo/putInExport', { this.download('material/purchaseCheckInfo/putInExport', {
...this.queryParams ...this.queryParams
}, `新购工机具入库_${new Date().getTime()}.xlsx`) }, `新购工机具入库_${new Date().getTime()}.xlsx`)
}, },
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
} }
}; };
</script> </script>