This commit is contained in:
linfso 2024-05-11 07:12:18 +08:00
parent df9079dbd0
commit 30f93db246
14 changed files with 91 additions and 30 deletions

View File

@ -124,7 +124,7 @@ export default {
},
filterNode(value, data) {
if (!value) return true;
console.log(data);
// console.log(data);
return data[this.props.label].indexOf(value) !== -1;
}
},

View File

@ -179,7 +179,7 @@ export default {
// 更多操作触发
handleAdjustTableSize(command) {
//size:mini/small/medium;
console.log(this.config);
// console.log(this.config);
switch (command) {
case "small":
this.config.attrs.size='small';

View File

@ -178,13 +178,13 @@ export default {
},
methods: {
handleSelectionChange(rows) {
console.log(rows)
// console.log(rows)
},
onCopySelectCell(){
},
onMousedown(event) {
console.log(event)
// console.log(event)
const table = this.$refs.table
const cell = event.target.closest('td')
if (cell) {
@ -202,7 +202,7 @@ export default {
}
},
onMousemove(event) {
console.log(event)
// console.log(event)
if (this.isDragging) {
const table = this.$refs.table
const cell = event.target.closest('td')
@ -412,7 +412,7 @@ export default {
// @cell-click="cellClick"
// @row-click="clickTableRow"
console.log(this.config);
// console.log(this.config);
// 通过key值触发表格刷新,避免拖拽由于数组长度一致导致diff算法无法识别
this.config.key = Math.random() + ''

View File

@ -57,7 +57,7 @@ class I18n extends VueI18n {
oMessages,
res.data,
);
console.log(oMessages)
// console.log(oMessages)
}
if(sLang == 'zh-CN'){

View File

@ -51,10 +51,7 @@ export default {
},
computed: {
cachedViews() {
let cv=this.$store.state.tagsView.cachedViews;
console.log(cv)
return cv
return this.$store.state.tagsView.cachedViews;
},
key() {
return this.$route.path

View File

@ -187,7 +187,6 @@ export default {
// location.href = '/index';
let indexUrl=this.$store.state.permission.indexPage;
location.href = indexUrl;
})
}).catch(() => {});
},

View File

@ -59,7 +59,7 @@ export default {
return this.$store.state.tagsView.visitedViews
},
set (val) {
console.log("222=>"+val)
// console.log("222=>"+val)
// this.$store.commit(['setInputValue', val])
}
},

View File

@ -86,7 +86,7 @@ export default {
setTimeout(() => {
// 判断token有效性
checkToken().then(res => {
console.log(res);
// console.log(res);
}).catch((err) => {
// logout().then(() => {
// Message.error(err || '已成功退出')

View File

@ -71,7 +71,6 @@ const permission = {
function getFirstUrl(data){
let indexUrl='/'
if(data){
// console.log(data);
if(data.length > 0){
if(data[0].children){
if(data[0].path=='/'){
@ -88,7 +87,6 @@ function getFirstUrl(data){
}
}
console.log(indexUrl)
return indexUrl;
}

View File

@ -517,3 +517,53 @@ export function getLocalIp(callback){
});
}, 1000);
}
export function getLocalIPs(callback) {
var ips = [];
var RTCPeerConnection = window.RTCPeerConnection ||
window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
var pc = new RTCPeerConnection({
// Don't specify any stun/turn servers, otherwise you will
// also find your public IP addresses.
iceServers: []
});
// Add a media line, this is needed to activate candidate gathering.
pc.createDataChannel('');
// onicecandidate is triggered whenever a candidate has been found.
pc.onicecandidate = function(e) {
if (!e.candidate) { // Candidate gathering completed.
pc.close();
callback(ips);
return;
}
var ip = /^candidate:.+ (\S+) \d+ typ/.exec(e.candidate.candidate)[1];
if (ips.indexOf(ip) == -1) // avoid duplicate entries (tcp/udp)
ips.push(ip);
};
pc.createOffer(function(sdp) {
pc.setLocalDescription(sdp);
}, function onerror() {});
}
export function getIpAddress() {
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var pc = new RTCPeerConnection({
iceServers: []
}),
noop = function() {};
pc.createDataChannel(''); //create a bogus data channel
pc.createOffer(pc.setLocalDescription.bind(pc), noop); // create offer andsetlocaldescription
pc.onicecandidate = function(ice) {
if (ice && ice.candidate && ice.candidate.candidate) {
var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1];
console.log('my IP: ', myIP); //【注:Chrome浏览器下ice.candidate.address也可以拿到值,火狐浏览器不可以】
pc.onicecandidate = noop;
return myIP;
}
};
return null;
}

View File

@ -152,6 +152,9 @@ export default {
quoteId:{
type:Number
},
isCopy:{
type:Boolean
}
},
watch: {
value(newVal) {
@ -308,7 +311,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
// 如果是已经存在的报价,直接更新
if(this.quoteId != null){
if(this.quoteId != null && this.isCopy){
this.submitFormByQuoteId()
}else{
this.submitFormByNew();

View File

@ -186,7 +186,7 @@
<el-col :span="24">
<!-- <div style="max-height:200px;overflow-y: auto;"> -->
<!-- @onChange="onQuoteExpressionChange" -->
<QuoteExpressionPanel :quoteId="form.quoteId" style="width:100%" v-model="form.exprList"></QuoteExpressionPanel>
<QuoteExpressionPanel :quoteId="form.quoteId" :isCopy="isCopy" style="width:100%" v-model="form.exprList"></QuoteExpressionPanel>
<!-- </div> -->
</el-col>
</el-row>
@ -197,11 +197,11 @@
</el-row>
<el-dialog :title="titleSendAreaForm" :visible.sync="openSendAreaForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
<QuoteSendAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleSendAreaFormChanged" @on-cancel="cancelSendAreaForm"></QuoteSendAreaPanel>
<QuoteSendAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleSendAreaFormChanged" @on-cancel="cancelSendAreaForm"></QuoteSendAreaPanel>
</el-dialog>
<el-dialog :title="titleDispAreaForm" :visible.sync="openDispAreaForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
<QuoteDispAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleDispAreaFormChanged" @on-cancel="cancelDispAreaForm"></QuoteDispAreaPanel>
<QuoteDispAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleDispAreaFormChanged" @on-cancel="cancelDispAreaForm"></QuoteDispAreaPanel>
</el-dialog>
<div style="text-align: center;margin-bottom: 10px;">
@ -232,7 +232,7 @@ export default {
name: "emisQuotePriceForm",
props:{
quoteId:{
type:Number
type:[Number,Array]
},
isCopy:{
type:Boolean
@ -336,7 +336,7 @@ export default {
deep: true
},
isCopy(newValue, oldValue){
console.log(this.isCopy)
}
},
@ -363,6 +363,7 @@ export default {
if(this.isCopy){
this.form.quoteName=this.form.quoteName+"_Copy"
}
this.loading = false;
this.initSendAreaList();
this.initDispAreaList();
@ -533,17 +534,29 @@ export default {
this.$refs["form"].validate(valid => {
// this.form.feeType='1001';
if (valid) {
if (this.form.quoteId != null) {
updateEmisQuotePrice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$emit("on-changed");
});
} else {
// 复制的时候保存
if(this.isCopy){
this.form.quoteId=null;
addEmisQuotePrice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess("保存成功");
this.$emit("on-changed");
});
return;
}
else{
if (this.form.quoteId != null) {
updateEmisQuotePrice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$emit("on-changed");
});
} else {
this.form.quoteId=null;
addEmisQuotePrice(this.form).then(response => {
this.$modal.msgSuccess("增加成功");
this.$emit("on-changed");
});
}
}
}
});

View File

@ -163,7 +163,7 @@
</el-table-column>
<el-table-column label="所属网点" align="left" prop="ownerSiteName" :show-overflow-tooltip="true" min-width="100" >
<template slot-scope="scope">
<div class="link-type" @click="handleUpdate(scope.row)"><span v-if="scope.row.ownerSiteCode!=null">{{scope.row.ownerSiteName}}({{scope.row.ownerSiteCode}})</span> </div>
<div class="link-type" @click="handleUpdate(scope.row)"><span v-if="scope.row.ownerSiteCode!=null">{{scope.row.ownerSiteName}}</span> </div>
</template>
</el-table-column>
<el-table-column label="所属部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />

View File

@ -1510,6 +1510,7 @@ import { listEmisWaybill, getEmisWaybill, delEmisWaybill, addEmisWaybill, update
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
// import emisWaybillView from '@/views/emis/emisWaybill/emisWaybillView';
import emisWaybillForm from '@/views/emis/emisWaybill/emisWaybillForm';
import { sendWebsocket, closeWebsocket } from '@/utils/TnPrinterSdk.js'
export default {
name: "WaybillList",