试运行问题修改
This commit is contained in:
parent
5b8a94b6d6
commit
f0842a417f
|
|
@ -19,7 +19,7 @@ export function getUseringData(query) {
|
|||
}
|
||||
|
||||
|
||||
//提交直转申请W
|
||||
//提交直转申请
|
||||
export function submitWorkSite(params = {}){
|
||||
return request({
|
||||
url:'/material/workSite/submit',
|
||||
|
|
@ -28,6 +28,24 @@ export function submitWorkSite(params = {}){
|
|||
})
|
||||
}
|
||||
|
||||
// 工地直转-根据协议号获取设备
|
||||
export function getDetailInfo(query) {
|
||||
return request({
|
||||
url: '/material/workSite/getInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//直转申请审批-同意
|
||||
export function passWorkSite(params = {}){
|
||||
return request({
|
||||
url:'/material/workSite/pass',
|
||||
method: 'post',
|
||||
data:params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -39,4 +57,3 @@ export function submitWorkSite(params = {}){
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -324,3 +324,11 @@ export function accessoryWarehousingEntry(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function purchaseCheckInfoRemove(maCode) {
|
||||
return request({
|
||||
url: '/material/purchaseCheckInfo/' + maCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -60,8 +60,8 @@ export default {
|
|||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
|
|
|
|||
|
|
@ -96,12 +96,14 @@
|
|||
<el-table-column label="接收方工程名称" align="center" prop="leaseProName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="转让方联系人及电话" align="center" prop="backMan" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.backMan || '/'}}</span><span>{{ scope.row.backPhone || '/' }}</span>
|
||||
<div>{{ scope.row.backMan || '/'}} <span v-if="scope.row.backMan&&scope.row.backPhone">:</span>{{ scope.row.backPhone || '/' }}</div>
|
||||
<!-- <span>{{ scope.row.backMan || '/'}}</span><span>{{ scope.row.backPhone || '/' }}</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收方联系人及电话" align="center" prop="leaseMan" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.leaseMan || '/'}}</span><span>{{ scope.row.leasePhone || '/' }}</span>
|
||||
<div>{{ scope.row.leaseMan || '/'}} <span v-if="scope.row.leaseMan&&scope.row.leasePhone">:</span>{{ scope.row.leasePhone || '/' }}</div>
|
||||
<!-- <span>{{ scope.row.leaseMan || '/'}}</span><span>{{ scope.row.leasePhone || '/' }}</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="办理时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
|
||||
|
|
@ -119,24 +121,25 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleExame(scope.row)"
|
||||
>审核</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
>直转单</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -154,7 +157,7 @@
|
|||
<el-form :model="dialogParams" ref="dialogForm" :rules="rules" size="small" :inline="true" label-width="100px">
|
||||
<el-row>
|
||||
<el-form-item label="退料单位" prop="backUnitId">
|
||||
<el-select v-model="dialogParams.backUnitId" filterable clearable @change="GetProData" style="width: 240px" placeholder="请选择">
|
||||
<el-select v-model="dialogParams.backUnitId" filterable clearable @change="GetProData" style="width: 240px" placeholder="请选择" :disabled="handleState==1">
|
||||
<el-option
|
||||
v-for="item in backUnitList"
|
||||
:key="item.id"
|
||||
|
|
@ -164,7 +167,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="backProId">
|
||||
<el-select v-model="dialogParams.backProId" filterable clearable @change="GetUnitData" style="width: 240px" placeholder="请选择">
|
||||
<el-select v-model="dialogParams.backProId" filterable clearable @change="GetUnitData" style="width: 240px" placeholder="请选择" :disabled="handleState==1">
|
||||
<el-option
|
||||
v-for="item in backProjectList"
|
||||
:key="item.id"
|
||||
|
|
@ -187,7 +190,7 @@
|
|||
<el-input
|
||||
v-model="dialogParams.backMan"
|
||||
placeholder="请输入退料人"
|
||||
clearable maxlength="50"
|
||||
clearable maxlength="50" :disabled="handleState==1"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -195,14 +198,14 @@
|
|||
<el-input
|
||||
v-model="dialogParams.backPhone"
|
||||
placeholder="请输入退料人电话"
|
||||
clearable maxlength="11"
|
||||
clearable maxlength="11" :disabled="handleState==1"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="领料单位" prop="leaseUnitId">
|
||||
<el-select v-model="dialogParams.leaseUnitId" filterable clearable @change="GetProData2" style="width: 240px" placeholder="请选择">
|
||||
<el-select v-model="dialogParams.leaseUnitId" filterable clearable @change="GetProData2" style="width: 240px" placeholder="请选择" :disabled="handleState==1">
|
||||
<el-option
|
||||
v-for="item in leaseUnitList"
|
||||
:key="item.id"
|
||||
|
|
@ -212,7 +215,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料工程" prop="leaseProId">
|
||||
<el-select v-model="dialogParams.leaseProId" filterable clearable @change="GetUnitData2" style="width: 240px" placeholder="请选择">
|
||||
<el-select v-model="dialogParams.leaseProId" filterable clearable @change="GetUnitData2" style="width: 240px" placeholder="请选择" :disabled="handleState==1">
|
||||
<el-option
|
||||
v-for="item in leaseProjectList"
|
||||
:key="item.id"
|
||||
|
|
@ -235,7 +238,7 @@
|
|||
<el-input
|
||||
v-model="dialogParams.leaseMan"
|
||||
placeholder="请输入领料人"
|
||||
clearable maxlength="50"
|
||||
clearable maxlength="50" :disabled="handleState==1"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -243,7 +246,7 @@
|
|||
<el-input
|
||||
v-model="dialogParams.leasePhone"
|
||||
placeholder="请输入领料人电话"
|
||||
clearable maxlength="11"
|
||||
clearable maxlength="11" :disabled="handleState==1"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -272,30 +275,35 @@
|
|||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="机具规格" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="当前在用量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="当前在用量" align="center" prop="useNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="直转数量" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
<el-input-number v-model="scope.row.directNum" controls-position="right" style="width: 100%;" :min="1" :max="Number(scope.row.num)" clearable :disabled="handleState==1|| handleState==2"></el-input-number>
|
||||
<!-- <el-input
|
||||
v-model="scope.row.directNum"
|
||||
placeholder="请输入直转数量"
|
||||
clearable
|
||||
/>
|
||||
/> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center" v-if="handleState==0">
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right" v-if="handleState==2">
|
||||
<el-button type="primary" @click="pass">同意</el-button>
|
||||
<el-button type="danger" >不同意</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUnitList, getProjectList, getProData, getUnitData, getAgreementInfoById,} from "@/api/claimAndRefund/receive";
|
||||
import { getWorkSiteList,getUseringData,submitWorkSite} from "@/api/claimAndRefund/constructionSite";
|
||||
|
||||
import { getWorkSiteList,getUseringData,submitWorkSite,getDetailInfo,passWorkSite } from "@/api/claimAndRefund/constructionSite";
|
||||
import { getInfo } from '@/api/login'
|
||||
export default {
|
||||
name: "ConstructionSite",
|
||||
dicts: ['sys_normal_disable'],
|
||||
|
|
@ -313,6 +321,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 单位数据
|
||||
unitList: [],
|
||||
user:{},
|
||||
// 工程数据
|
||||
projectList: [],
|
||||
// 总条数
|
||||
|
|
@ -330,6 +339,7 @@ export default {
|
|||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
handleState:0,//0新增1查看2审批
|
||||
dialogLoading: false,
|
||||
dialogParams:{},
|
||||
deviceList: [],//弹窗table数据
|
||||
|
|
@ -339,6 +349,7 @@ export default {
|
|||
leaseProjectList: [],//领料项目列表
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
// 表单校验
|
||||
rules: {//backUnitId backProId leaseUnitId leaseProId
|
||||
backUnitId: [
|
||||
|
|
@ -357,6 +368,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo()
|
||||
this.getUnitList();
|
||||
this.getProjectList();
|
||||
this.getList();
|
||||
|
|
@ -367,6 +379,12 @@ export default {
|
|||
this.GetProData2()
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
async getUserInfo(){
|
||||
const res = await getInfo()
|
||||
this.user = res.user
|
||||
},
|
||||
|
||||
//获取单位类型 ,getUnitList, getProjectList
|
||||
getUnitList(){
|
||||
getUnitList().then(response => {
|
||||
|
|
@ -456,7 +474,8 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
|
||||
/** 查询设备列表 */
|
||||
getDialogList() {
|
||||
this.dialogLoading = true;
|
||||
|
||||
|
|
@ -467,6 +486,9 @@ export default {
|
|||
// console.log(response)
|
||||
if(response.code==200){
|
||||
this.deviceList = response.rows;
|
||||
this.deviceList.forEach(item=>{
|
||||
this.$set(item,'directNum',1)
|
||||
})
|
||||
this.dialogLoading = false;
|
||||
}else{
|
||||
this.dialogLoading = false;
|
||||
|
|
@ -476,7 +498,6 @@ export default {
|
|||
);
|
||||
},
|
||||
|
||||
|
||||
// 获取 单位 列表数据
|
||||
async GetUnitData2(){
|
||||
const params = {
|
||||
|
|
@ -528,9 +549,10 @@ export default {
|
|||
/** 工地直转--打开弹窗 */
|
||||
handleAdd() {
|
||||
this.resetForm("dialogForm");
|
||||
this.deviceList = []
|
||||
this.open = true;
|
||||
this.title = "工地直转";
|
||||
this.deviceList = []
|
||||
this.handleState=0
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
|
@ -538,11 +560,6 @@ export default {
|
|||
console.log(this.selectedList)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
|
|
@ -570,6 +587,109 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
let param = { id:row.id }
|
||||
this.getDetail(param)
|
||||
this.open = true;
|
||||
this.handleState=1
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleExame(row) {
|
||||
console.log(row)
|
||||
let param = { id:row.id }
|
||||
this.getDetail(param)
|
||||
this.open = true;
|
||||
this.handleState=2
|
||||
},
|
||||
getDetail(param){
|
||||
getDetailInfo(param).then(res => {
|
||||
if(res.code==200){
|
||||
this.dialogParams = res.data;
|
||||
this.$set(this.dialogParams,'backUnitId',Number(res.data.backUnitId))
|
||||
this.$set(this.dialogParams,'backProId',Number(res.data.backProId))
|
||||
// this.$set(this.dialogParams,'backAgreementCode',res.data.tagreementCode)
|
||||
this.$set(this.dialogParams,'leaseUnitId',Number(res.data.leaseUnitId))
|
||||
this.$set(this.dialogParams,'leaseProId',Number(res.data.leaseProId))
|
||||
this.deviceList = res.data.directApplyDetails;
|
||||
this.deviceList.forEach(item=>{
|
||||
item.typeModelName=item.modelName;
|
||||
// item.num = item.useNum
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
pass(){
|
||||
console.log(this.dialogParams)
|
||||
let data = this.dialogParams
|
||||
let backList = this.deviceList.map(item=>{
|
||||
item.status = 0;
|
||||
item.typeCode = item.modelName
|
||||
item.preNum = item.directNum
|
||||
item.unitNames = item.unitName
|
||||
return item
|
||||
})
|
||||
console.log(backList,'backList------')
|
||||
let backApplyInfo = {
|
||||
types:2,
|
||||
unitId:data.backUnitId,
|
||||
proId:data.backProId,
|
||||
agreementId:data.backAgreementId,
|
||||
agreementCode:data.backAgreementCode,
|
||||
companyId:null,
|
||||
createBy:this.user.userName,
|
||||
backApplyInfo:{
|
||||
backPerson:data.backMan,
|
||||
phone:data.backPhone,
|
||||
remark:''
|
||||
},
|
||||
backApplyDetails:backList
|
||||
}
|
||||
console.log(backApplyInfo,'backApplyInfo------')
|
||||
let leaseList = this.deviceList.map(item=>{
|
||||
item.status = 0;
|
||||
item.typeCn = item.typeName
|
||||
item.guigeCn = item.modelName
|
||||
item.preNum = item.directNum
|
||||
item.unitCn = item.unitName
|
||||
return item
|
||||
})
|
||||
console.log(leaseList,'leaseList---------')
|
||||
let leaseApplyInfo = {
|
||||
types:2,
|
||||
unitId:data.leaseUnitId,
|
||||
proId:data.leaseProId,
|
||||
agreementId:data.leaseAgreementId,
|
||||
agreementCode:data.leaseAgreementCode,
|
||||
companyId:null,
|
||||
createBy:this.user.userName,
|
||||
taskType:29,
|
||||
taskStatus:30,
|
||||
leaseApplyInfo:{
|
||||
leasePerson:data.leaseMan,
|
||||
phone:data.leasePhone,
|
||||
remark:''
|
||||
},
|
||||
leaseApplyDetails:leaseList
|
||||
}
|
||||
console.log(leaseApplyInfo)
|
||||
let param = {
|
||||
id:this.dialogParams.id,
|
||||
backApplyInfo:backApplyInfo,
|
||||
leaseApplyInfo:leaseApplyInfo
|
||||
}
|
||||
passWorkSite(param).then(res => {
|
||||
if(res.code==200){
|
||||
this.open = false;
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.getList()
|
||||
}else{
|
||||
this.$modal.msgError("操作失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// const dictIds = row.dictId || this.selectedList;
|
||||
|
|
|
|||
|
|
@ -8,54 +8,49 @@
|
|||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-form-item label="关键字" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="dictName">
|
||||
<el-form-item label="单位名称" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="dictName">
|
||||
<el-form-item label="工程名称" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工机具类型" prop="dictName">
|
||||
<el-form-item label="工机具类型" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入工机具类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议号" prop="dictName">
|
||||
<el-form-item label="协议号" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请选择协议号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="完成情况" prop="dictName">
|
||||
<el-form-item label="完成情况" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请选择完成情况"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
|
|
@ -63,9 +58,8 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退料申请时间" prop="dictName">
|
||||
<el-form-item label="退料申请时间" >
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入退料申请时间"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
|
|
@ -483,12 +477,12 @@ export default {
|
|||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.typeList = response.rows;
|
||||
this.total = response.total;
|
||||
// listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
// this.typeList = response.rows;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
// }
|
||||
// );
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
|
|||
|
|
@ -371,10 +371,10 @@
|
|||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="uploadOpen"
|
||||
width="500px"
|
||||
width="450px"
|
||||
append-to-body
|
||||
>
|
||||
<div style="text-align: center">
|
||||
<div style="text-align: center" ref="codeBox">
|
||||
<div class="uploadImg">
|
||||
<div id="qrcode" class="qrcode" ref="codeItem"></div>
|
||||
<!-- <img src="" alt="">-->
|
||||
|
|
@ -385,7 +385,7 @@
|
|||
<el-button type="primary" @click="downloadCode">下 载</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div style="background-color: transparent">
|
||||
<div style="background-color: transparent" ref="qrCodeAll">
|
||||
<div
|
||||
id="qrCode"
|
||||
v-for="(codeItem, codeIndex) in checkboxModel"
|
||||
|
|
@ -729,6 +729,10 @@ export default {
|
|||
let shareContent = that.$refs["QrcodePage"][i],
|
||||
width = shareContent.offsetWidth,
|
||||
height = shareContent.offsetHeight;
|
||||
const maCodeText = document.createElement("div");
|
||||
maCodeText.innerHTML = "设备编码:"+element.maCode;
|
||||
maCodeText.style = "font-size=18px; width:100%;text-align:center;margin:10px;"
|
||||
shareContent.appendChild(maCodeText);
|
||||
new QRCode(captureId[i], {
|
||||
width: width,
|
||||
height: height,
|
||||
|
|
@ -817,18 +821,21 @@ export default {
|
|||
colorLight: '#ffffff',
|
||||
correctLevel: QRCode.CorrectLevel.H,
|
||||
})
|
||||
|
||||
// });
|
||||
}, 500)
|
||||
},
|
||||
downloadCode(e) {
|
||||
let imgSrc, canvas
|
||||
if (document.getElementById('qrcode').childNodes[0]) {
|
||||
canvas = document.getElementById('qrcode').childNodes[0]
|
||||
imgSrc = this.CanvasToImage(canvas).getAttribute('src')
|
||||
const alink = document.createElement('a')
|
||||
alink.href = imgSrc
|
||||
alink.download = this.labelmaCode
|
||||
alink.click()
|
||||
let element = this.$refs.codeBox;
|
||||
html2canvas(element).then((canvas) => {
|
||||
// 将canvas转换为图片URL
|
||||
const image = canvas.toDataURL('image/png');
|
||||
const alink = document.createElement('a')
|
||||
alink.href = image
|
||||
alink.download = this.labelmaCode
|
||||
alink.click()
|
||||
});
|
||||
}
|
||||
},
|
||||
CanvasToImage(canvas) {
|
||||
|
|
@ -905,13 +912,19 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// .qrcode{
|
||||
// height: 300px;
|
||||
// width: 300px;
|
||||
// }
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.maCode {
|
||||
margin-top: 15px;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
|
|
|
|||
|
|
@ -216,6 +216,21 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 标签下载对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="uploadOpen"
|
||||
width="500px"
|
||||
append-to-body
|
||||
>
|
||||
<div style="text-align: center">
|
||||
<div class="uploadImg">
|
||||
<div id="qrcode" class="qrcode" ref="codeItem"></div>
|
||||
</div>
|
||||
<div class="maCode">设备编号:{{ rowObj.maCode }}</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
|
|
@ -255,6 +270,7 @@
|
|||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { listLabelHistoryList } from "@/api/store/label";
|
||||
import { getTypeList } from "@/api/store/warehousing";
|
||||
import QRCode from 'qrcodejs2'
|
||||
export default {
|
||||
name: "LabelBindingHistory",
|
||||
dicts: ['sys_normal_disable'],
|
||||
|
|
@ -300,7 +316,11 @@ export default {
|
|||
dictType: [
|
||||
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
},
|
||||
rowObj: {},
|
||||
labelmaCode: '',
|
||||
uploadOpen: false,
|
||||
qrUrl:'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode=',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -398,6 +418,32 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
//二维码查看
|
||||
labelUploadCode(row) {
|
||||
// if (row.maCode == null) {
|
||||
// this.$message.error('当前设备没有设备编码');
|
||||
// return
|
||||
// }
|
||||
// this.labelCodeName = ''
|
||||
this.rowObj = row
|
||||
this.uploadOpen = true;
|
||||
this.title = "二维码查看";
|
||||
this.labelmaCode = row.labelCode
|
||||
let str = this.qrUrl+row.labelCode
|
||||
this.$nextTick(() => {
|
||||
// this.selectionList.forEach((item, index) => {
|
||||
this.$refs.codeItem.innerHTML = "";
|
||||
var qrcode = new QRCode(this.$refs.codeItem, {
|
||||
text: str, //二维码内容
|
||||
width: 256,
|
||||
height: 256,
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
correctLevel: QRCode.CorrectLevel.H,
|
||||
})
|
||||
// });
|
||||
}, 500)
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const labelIds = row.labelId || this.ids;
|
||||
|
|
@ -429,4 +475,17 @@ export default {
|
|||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.uploadImg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.maCode {
|
||||
margin-top: 15px;
|
||||
font-size: 18px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -175,30 +175,6 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="基层单位" prop="dictName">
|
||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="dictName">
|
||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数" prop="dictName">
|
||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划单价" prop="dictName">
|
||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="dictName">
|
||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 验收单弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body>
|
||||
|
|
@ -290,8 +266,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { listPurchaseCheckInfo,getPurchaseCheckInfo,getAcceptanceForm } from "@/api/store/newBuy";
|
||||
import { listPurchaseCheckInfo,getPurchaseCheckInfo,getAcceptanceForm,purchaseCheckInfoRemove } from "@/api/store/newBuy";
|
||||
import { getRepairedList, getRepairedDetailList, inputByType,getTypeList } from "@/api/store/warehousing";
|
||||
import vueEasyPrint from 'vue-easy-print';
|
||||
import {getLeaseAuditListAll} from "@/api/claimAndRefund/receive";
|
||||
|
|
@ -321,8 +296,6 @@ export default {
|
|||
typeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
|
|
@ -335,29 +308,10 @@ export default {
|
|||
openPrint: false,
|
||||
printData:{},
|
||||
printTableData:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
dictName: [
|
||||
{ required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
],
|
||||
dictType: [
|
||||
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//refresh
|
||||
// const refresh = this.$route.query && this.$route.query.refresh;
|
||||
// console.log(refresh,'111111111')
|
||||
// if(refresh){
|
||||
// this.queryParams.keyWord = ''
|
||||
// this.queryParams.typeId = ''
|
||||
// this.getList();
|
||||
// this.getTypeList();
|
||||
// }
|
||||
|
||||
this.getList();
|
||||
this.getTypeList();
|
||||
},
|
||||
|
|
@ -373,26 +327,6 @@ export default {
|
|||
);
|
||||
},
|
||||
|
||||
/** 查询字典类型列表 */
|
||||
// async getList() {
|
||||
// this.loading = true;
|
||||
//
|
||||
// const params = {
|
||||
// keyWord:this.queryParams.keyWord,
|
||||
// startTime:this.queryParams.time && this.queryParams.time[0],
|
||||
// endTime:this.queryParams.time && this.queryParams.time[1],
|
||||
// typId:this.queryParams.typId,
|
||||
// pageSize: this.queryParams.pageSize,
|
||||
// pageNum: this.queryParams.pageNum
|
||||
// }
|
||||
//
|
||||
// const res = await listPurchaseCheckInfo(params)
|
||||
// this.loading = false;
|
||||
// this.typeList = res.data.rows;
|
||||
// this.total = res.data.total;
|
||||
//
|
||||
// },
|
||||
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
|
|
@ -410,22 +344,6 @@ export default {
|
|||
}
|
||||
);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
// dictId: undefined,
|
||||
// dictName: undefined,
|
||||
// dictType: undefined,
|
||||
// status: "0",
|
||||
// remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -453,41 +371,10 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictId)
|
||||
this.ids = selection.map(item => item.taskId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// /** 修改按钮操作 */
|
||||
// handleUpdate(row) {
|
||||
// this.$router.replace("/store/newBuy/newDevicesArrival");
|
||||
// // this.reset();
|
||||
// // const dictId = row.dictId || this.ids
|
||||
// // getType(dictId).then(response => {
|
||||
// // this.form = response.data;
|
||||
// // this.open = true;
|
||||
// // this.title = "修改字典类型";
|
||||
// // });
|
||||
// },
|
||||
/** 提交按钮 */
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 验收按钮 */
|
||||
handleAccept(row) {
|
||||
|
|
@ -523,10 +410,10 @@ export default {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
const dictIds = row.dictId || this.ids;
|
||||
// console.log(row)
|
||||
const taskIds = row.taskId || this.ids;
|
||||
this.$modal.confirm('是否确认删除该数据项?').then(function() {
|
||||
return delType(dictIds);
|
||||
return purchaseCheckInfoRemove(taskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
@ -538,13 +425,7 @@ export default {
|
|||
...this.queryParams
|
||||
}, `新购工机具验收_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 刷新缓存按钮操作 */
|
||||
handleRefreshCache() {
|
||||
refreshCache().then(() => {
|
||||
this.$modal.msgSuccess("刷新成功");
|
||||
this.$store.dispatch('dict/cleanDict');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -597,11 +597,16 @@ export default {
|
|||
const typeId = row.typeId || this.ids;
|
||||
getMaType(typeId).then(response => {
|
||||
this.form = response.data;
|
||||
let file = {
|
||||
name:this.form.documentName,
|
||||
type:this.form.documentUrl,
|
||||
if(this.form.documentUrl){
|
||||
let file = {
|
||||
name:this.form.documentName,
|
||||
type:this.form.documentUrl,
|
||||
}
|
||||
this.field101fileList.push(file)
|
||||
}else{
|
||||
this.field101fileList=[]
|
||||
}
|
||||
this.field101fileList.push(file)
|
||||
|
||||
|
||||
this.imageUrl = this.form.photoUrl
|
||||
this.open = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue