|
@@ -11,7 +11,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<span>增加</span>
|
|
|
- <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
|
|
|
+ <el-input-number v-model="addNum" :controls="false" style="width:50px;" :min="1" :max="50"></el-input-number>
|
|
|
<span>个{{category.Name}}</span>
|
|
|
<el-button @click="handleAddTableRow">增加</el-button>
|
|
|
</el-row>
|
|
@@ -33,11 +33,8 @@
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
<!-- 型号弹窗 -->
|
|
|
<firm :mess="{deviceId: firmId}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
- <!-- 供应商合同弹窗 -->
|
|
|
- <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
|
|
|
<!-- 供应商弹窗 -->
|
|
|
<supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
|
|
|
- <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
|
|
|
<upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
|
|
|
</upload-files-dialog>
|
|
|
<upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
|
|
@@ -45,6 +42,22 @@
|
|
|
<insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
|
|
|
<pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
|
|
|
+ <!-- 不支持的输入方式 -->
|
|
|
+ <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
|
|
|
+ <el-row>
|
|
|
+ 该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击
|
|
|
+ <el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>
|
|
|
+ 。
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top:20px;" v-show="updateInputShow">
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容"
|
|
|
+ v-model="updateInput"></el-input>
|
|
|
+ </el-row>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="myDialog.update = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -65,11 +78,9 @@ import { mapGetters, mapActions } from "vuex";
|
|
|
|
|
|
import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
import firm from "@/components/dialogs/list/firm";
|
|
|
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
|
|
|
import supplierDialog from "@/components/dialogs/list/supplierDialog";
|
|
|
import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
|
|
|
import insurerDialog from "@/components/dialogs/list/insurerDialog";
|
|
|
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
|
|
|
import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
|
|
|
import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
|
|
|
import picDialog from "@/components/dialogs/list/picDialog";
|
|
@@ -77,11 +88,9 @@ export default {
|
|
|
components: {
|
|
|
qrcode, //二维码页面
|
|
|
firm, //品牌型号弹窗
|
|
|
- supplyDialog,
|
|
|
supplierDialog,
|
|
|
maintainerDialog,
|
|
|
insurerDialog,
|
|
|
- guaranteeDialog,
|
|
|
uploadFilesDialog,
|
|
|
uploadImgDialog,
|
|
|
picDialog,
|
|
@@ -108,9 +117,7 @@ export default {
|
|
|
myDialog: {
|
|
|
qrcode: false, //二维码弹窗
|
|
|
firm: false, //厂商弹窗
|
|
|
- supply: false, //选择供应合同
|
|
|
supplier: false, //供应商选择
|
|
|
- guarantee: false, //选择保单
|
|
|
maintainer: false, //选择维修商
|
|
|
insurer: false, //选择保险公司
|
|
|
uploadFiles: false, //上传文件
|
|
@@ -120,8 +127,21 @@ export default {
|
|
|
systemType: false,
|
|
|
details: false, //详情页
|
|
|
changeRea: false,
|
|
|
- lookPic: false //图片查看
|
|
|
+ lookPic: false, //图片查看
|
|
|
+ update: false,//临时维护信息点
|
|
|
},
|
|
|
+ updateInputShow: false, //是否显示临时维护输入框
|
|
|
+ updateInfoPoint: '',//临时维护信息点
|
|
|
+ updateInput: '', //临时维护信息点值
|
|
|
+ inputMap: {
|
|
|
+ flowBuild: {
|
|
|
+ InputMode: 'D1',
|
|
|
+ Editable:true,
|
|
|
+ InfoPointCode:"flowBuild",
|
|
|
+ InfoPointName:"建筑楼层",
|
|
|
+ Path:"flowBuild"
|
|
|
+ }
|
|
|
+ }, //信息点和输入方式映射表
|
|
|
qrcodeUrl: "", //二维码图片地址
|
|
|
filesArr: [], //保存临时的文件key
|
|
|
imgsArr: [], //临时保存的图片key数组
|
|
@@ -169,6 +189,11 @@ export default {
|
|
|
};
|
|
|
await getDataDictionary(params, res => {
|
|
|
this.tableHeader = res.Content;
|
|
|
+ this.tableHeader.forEach(item => {
|
|
|
+ if (item.Path) {
|
|
|
+ this.inputMap[item.Path] = item;
|
|
|
+ }
|
|
|
+ })
|
|
|
this.initTable();
|
|
|
});
|
|
|
},
|
|
@@ -388,21 +413,6 @@ export default {
|
|
|
tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
|
|
|
tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
|
|
|
},
|
|
|
- supplyChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data });
|
|
|
- },
|
|
|
- //保险合同
|
|
|
- guaranteeChange(data) {
|
|
|
- for (let key in data) {
|
|
|
- this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
|
|
|
- if (key == "contractFile") {
|
|
|
- if (!!data[key]) {
|
|
|
- data[key] = [data[key]];
|
|
|
- }
|
|
|
- }
|
|
|
- this.utilToKey(key, "contractFile", data, "InsuranceFile");
|
|
|
- }
|
|
|
- },
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
|
this.setDataToMain(keys, this.messKey, this.row);
|
|
@@ -462,60 +472,75 @@ export default {
|
|
|
getInfors(infos, row) {
|
|
|
//其他的开始判断
|
|
|
let val = this.tableExample.colToProp(row.col);
|
|
|
+ let inputData = this.inputMap[val];
|
|
|
+ this.row = row.row;
|
|
|
+ this.messKey = val;
|
|
|
//设备二维码图片
|
|
|
if (val == "EquipQRCode") {
|
|
|
this.myDialog.qrcode = true;
|
|
|
this.$refs.qrcode.getCanvas(1111);
|
|
|
}
|
|
|
- //关联系统
|
|
|
- if (val == "linkSystem") {
|
|
|
- // this.systemList = this.tableData[row.row].linkSystem || [];
|
|
|
- this.myDialog.systemType = true;
|
|
|
- }
|
|
|
+
|
|
|
//品牌型号弹窗
|
|
|
if (val == "DPManufacturerID") {
|
|
|
- this.myDialog.firm = true;
|
|
|
+ const PropertyId = this.tableData[row.row].PropertyId;
|
|
|
+ if (PropertyId) { //关联资产
|
|
|
+ this.myDialog.firm = true;
|
|
|
+ } else { //未关联资产
|
|
|
+ this.$message('请先关联资产后再维护该信息!');
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
//供应商信息弹窗
|
|
|
if (val == "DPSupplierID") {
|
|
|
- this.myDialog.supplier = true;
|
|
|
+ const PropertyId = this.tableData[row.row].PropertyId;
|
|
|
+ if (PropertyId) { //关联资产
|
|
|
+ this.myDialog.supplier = true;
|
|
|
+ } else { //未关联资产
|
|
|
+ this.$message('请先关联资产后再维护该信息!');
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
//维修商信息弹窗
|
|
|
if (val == "DPMaintainerID") {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
+ const PropertyId = this.tableData[row.row].PropertyId;
|
|
|
+ if (PropertyId) { //关联资产
|
|
|
+ this.myDialog.maintainer = true;
|
|
|
+ } else { //未关联资产
|
|
|
+ this.$message('请先关联资产后再维护该信息!');
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
//保险公司信息
|
|
|
if (val == "DPInsurerID") {
|
|
|
- this.myDialog.insurer = true;
|
|
|
- }
|
|
|
- //供应合同编号
|
|
|
- if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
|
- let falg = null;
|
|
|
- let data = this.tableData[row.row].DPSupplierID;
|
|
|
- if (data) {
|
|
|
- falg = data.split("-")[0];
|
|
|
- }
|
|
|
- if (!!falg) {
|
|
|
- this.id = falg;
|
|
|
- this.myDialog.supply = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择供应商");
|
|
|
+ const PropertyId = this.tableData[row.row].PropertyId;
|
|
|
+ if (PropertyId) { //关联资产
|
|
|
+ this.myDialog.insurer = true;
|
|
|
+ } else { //未关联资产
|
|
|
+ this.$message('请先关联资产后再维护该信息!');
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
- //保险单号
|
|
|
- if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
|
- //选择保单
|
|
|
- let falg = null;
|
|
|
- let data = this.tableData[row.row].DPInsurerID
|
|
|
- if (data) {
|
|
|
- falg = data.split("-")[0];
|
|
|
- }
|
|
|
- if (!!falg) {
|
|
|
- this.id = falg;
|
|
|
- this.myDialog.guarantee = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择保险商");
|
|
|
+ if (
|
|
|
+ val == "flowBuild" || //所属建筑楼层
|
|
|
+ val == "LedgerParam.EquipManufactor.ProductDate" || //生产日期
|
|
|
+ val == "LedgerParam.EquipManufactor.SerialNum" || //出厂编号
|
|
|
+ val == "LedgerParam.SupplyPurchase.AssetID" || //资产编号
|
|
|
+ val == "LedgerParam.SupplyPurchase.PurchasePrice" || //采购价格
|
|
|
+ val == "LedgerParam.InsuranceDoc.InsuranceNum" || //保险单号
|
|
|
+ val == "LedgerParam.InsuranceDoc.InsuranceFile" //保险文件
|
|
|
+ ) {
|
|
|
+ const PropertyId = this.tableData[row.row].PropertyId;
|
|
|
+ if (!PropertyId) { //未关联资产
|
|
|
+ this.$confirm('请先关联资产再维护该信息!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ showCancelButton: false,
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
+ return false
|
|
|
}
|
|
|
//保险文件--设备文档--安装质检报告
|
|
|
if (
|
|
@@ -553,8 +578,31 @@ export default {
|
|
|
this.picsArr = data ? data : []
|
|
|
this.myDialog.pic = true;
|
|
|
}
|
|
|
- this.row = row.row;
|
|
|
- this.messKey = val;
|
|
|
+ if (!this.onlyRead && !inputData.Editable) {
|
|
|
+ this.$message("该信息点的值为自动生成,不可人工维护!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
|
|
|
+ this.updateInfoPoint = val;
|
|
|
+ this.updateInput = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.myDialog.update = true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //关闭临时维护弹窗回调
|
|
|
+ handleCloseUpdate() {
|
|
|
+ this.updateInputShow = false
|
|
|
+ this.updateInfoPoint = ''
|
|
|
+ this.updateInput = ''
|
|
|
+ },
|
|
|
+ //更新临时维护信息点
|
|
|
+ handleClickUpdate() {
|
|
|
+ // this.$message("更新成功");
|
|
|
+ tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
|
+ this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
|
+ this.updateInputShow = false
|
|
|
+ this.myDialog.update = false
|
|
|
+ this.updateInput = ''
|
|
|
},
|
|
|
utilToKey(key, name, data, messName) {
|
|
|
if (key == name) {
|