张同海 2 years ago
commit ce35ba35d9

@ -388,7 +388,7 @@
:dropdown-style="{ width: '200px' }"
@select="shipagencySelect"
@change="debounce(shipagencyChange, 300, $event)"
@focus="shipagencyChange"
@focus="shipagencyChangeFirst"
/>
</a-form-model-item>
</a-col>
@ -988,7 +988,7 @@ export default {
const arr = []
this.shipagencyData.map((item, index) => {
if (!arr.includes(item.name)) {
arr.push(item.name)
arr.push(`${item.name}/${item.showCode}`)
}
})
return arr
@ -1296,8 +1296,9 @@ export default {
})
},
shipagencySelect(value) {
// const index = this.shipagencyDataArr.indexOf(value)
this.details.shipagency = value
const index = this.shipagencyDataArr.indexOf(value)
this.details.shipagency = this.shipagencyData[index].name
this.details.shipagencyid = this.shipagencyData[index].code
},
shipagencyChange(value) {
if (!value) {
@ -1305,6 +1306,11 @@ export default {
}
this.getForwarderlist(value)
},
shipagencyChangeFirst(value) {
console.log('=== 船代初始 ===', value, this.details.shipagency, this.shipagencyData)
if (this.details.shipagency) { return false }
this.getForwarderlist(value)
},
// - end
// - start
@ -1866,12 +1872,12 @@ export default {
/deep/ .ant-select-selection__clear{
right: 10px !important;
margin-top: -4px !important;
margin-top: -6px !important;
}
/deep/ form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear{
right: 10px !important;
margin-top: -4px !important;
margin-top: -6px !important;
}
/deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{

@ -402,7 +402,7 @@
<a-col :span="12">
<a-form-model-item
class="from-label"
label="收货代码"
label="收货代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
@ -418,8 +418,9 @@
:dropdown-style="{ width: '300px' }"
@select="placereceiptSelect"
@focus="placereceiptChange"
@change="debounce(placereceiptChange, 300, $event)"
@change="debounce(placereceiptChange, 0, $event)"
></auto-complete>
<!-- @change="debounce(placereceiptChange, 100, $event)" -->
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -454,7 +455,7 @@
:dropdown-style="{ width: '300px' }"
@select="portloadSelect"
@focus="portloadChange"
@change="debounce(portloadChange, 300, $event)"
@change="debounce(portloadChange, 0, $event)"
></auto-complete>
</a-form-model-item>
</a-col>
@ -490,7 +491,7 @@
:dropdown-style="{ width: '300px' }"
@select="transportSelect"
@focus="transportChange"
@change="debounce(transportChange, 300, $event)"
@change="debounce(transportChange, 0, $event)"
/>
</a-form-model-item>
</a-col>
@ -526,7 +527,7 @@
:dropdown-style="{ width: '300px' }"
@select="portdischargeSelect"
@focus="portdischargeChange"
@change="debounce(portdischargeChange, 300, $event)"
@change="debounce(portdischargeChange, 0, $event)"
/>
</a-form-model-item>
</a-col>
@ -562,7 +563,7 @@
:dropdown-style="{ width: '300px' }"
@select="destinationSelect"
@focus="destinationChange"
@change="debounce(destinationChange, 300, $event)"
@change="debounce(destinationChange, 0, $event)"
/>
</a-form-model-item>
</a-col>
@ -597,7 +598,7 @@
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px' }"
@select="placedeliverySelect"
@change="debounce(placedeliveryChange, 300, $event)"
@change="debounce(placedeliveryChange, 0, $event)"
@focus="placedeliveryChange"
/>
</a-form-model-item>
@ -1288,7 +1289,7 @@ export default {
const arr = []
res.data.map((item, index) => {
arr.push({
...{ selectShowTab: item.name + ' / ' + item.code },
...{ selectShowTab: item.name + ' / ' + item.showCode },
...item
})
})
@ -1883,7 +1884,6 @@ export default {
}
},
getTextareaChange({ type, value }) {
console.log('== 输入框更新 ==', type, value)
this.details[type] = value
// console.log(this.details[type])
this.$forceUpdate()
@ -2461,7 +2461,7 @@ form .has-feedback .ant-time-picker-clear {
/deep/ .ant-input-suffix {
color: rgba(0, 0, 0, 0.25);
display: none;
// display: none;
}
/deep/ .ant-input-affix-wrapper:hover {
.ant-input-suffix {

@ -1,13 +1,14 @@
<template>
<a-textarea
<textarea
class="ant-input"
v-model="value"
:auto-size="{ minRows: 2, maxRows: 5 }"
style="height: 120px"
style="width:100%;display:inline-block;height: 120px"
@blur="textareaBlur"
@change="textareaChange"
/>
@input="debounce(textareaChange, 300, $event)"
></textarea>
</template>
<script>
let timer;
export default {
name: '',
props: {
@ -22,16 +23,25 @@ export default {
},
data() {
return {
value: this.parentVal || ''
value: this.parentVal || '',
inEdit: false
}
},
watch: {
parentVal(nval, oval) {
if (this.inEdit) { return false }
console.log('== 回传赋值 ==', nval)
this.value = nval
}
},
mounted() {},
methods: {
debounce (func, wait, ...args) {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
func.apply(this, args);
}, wait);
},
textareaBlur() {
this.$emit('getTextareaChange', {
type: this.type,
@ -39,12 +49,14 @@ export default {
})
},
textareaChange(e) {
// if (e.type === 'click' && !this.value) {
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
this.$emit('getTextareaChange', {
type: this.type,
value: this.value
})
// }
}
}
}

Loading…
Cancel
Save