md
This commit is contained in:
parent
293b9f0e29
commit
8999e81a03
@ -609,3 +609,23 @@ export function addDateTimeByDay(dateStr,day) {
|
||||
}
|
||||
|
||||
|
||||
export function debounce(callback ,delay ) {
|
||||
let timeoutID;
|
||||
|
||||
function wrapper() {
|
||||
const self = this;
|
||||
const args = arguments;
|
||||
|
||||
function exec() {
|
||||
callback.apply(self, args);
|
||||
}
|
||||
|
||||
clearTimeout(timeoutID);
|
||||
|
||||
timeoutID = setTimeout(exec, delay);
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
:remote-method="queryData"
|
||||
:remote-method="remoteDebounce"
|
||||
v-model="svalue"
|
||||
:placeholder="placeholder"
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
<script>
|
||||
import emitter from 'element-ui/src/mixins/emitter';
|
||||
import { listSimpleEmisCountry} from "@/api/emis/emisCountry";
|
||||
import { debounce} from "@/utils/custom";
|
||||
|
||||
export default {
|
||||
name: "CountryPicker",
|
||||
@ -84,6 +85,9 @@
|
||||
this.$emit("onChange",itemData);
|
||||
this.dispatch('ElFormItem', 'el.form.change', [this.svalue]);
|
||||
},
|
||||
remoteDebounce(val,key){
|
||||
debounce(this.queryData(val,key),1500);
|
||||
},
|
||||
queryData(val,key) {
|
||||
this.optionItems=[];
|
||||
let queryParams = {
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
:size="size"
|
||||
:props="props"
|
||||
:key="resetCascader"
|
||||
@change="handleChange"
|
||||
v-model="svalue"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
filterable
|
||||
@focus="onFocus"
|
||||
@clear="onClear"
|
||||
@change="handleChange"
|
||||
></el-cascader>
|
||||
</template>
|
||||
<script>
|
||||
@ -108,6 +109,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClear(){
|
||||
this.svalue = null;
|
||||
this.$emit("input", this.svalue);
|
||||
this.$emit("onChange", this.svalue);
|
||||
},
|
||||
onFocus(){
|
||||
this.lineCode=null;
|
||||
this.prodCode=null;
|
||||
@ -137,7 +143,6 @@ export default {
|
||||
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
this.$emit("input", this.svalue);
|
||||
this.$emit("onChange", this.svalue);
|
||||
},
|
||||
|
||||
@ -187,12 +187,14 @@
|
||||
</el-table-column>
|
||||
</XdTable>
|
||||
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" v-dialogDrag append-to-body>
|
||||
<emisDestinationForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisDestinationForm>
|
||||
</el-dialog>
|
||||
<template>
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" v-dialogDrag append-to-body>
|
||||
<emisDestinationForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisDestinationForm>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<!-- append-to-body
|
||||
:destroy-on-close="true"
|
||||
:destroy-on-close="true"
|
||||
-->
|
||||
|
||||
</el-col>
|
||||
|
||||
@ -152,12 +152,14 @@ export default {
|
||||
|
||||
methods: {
|
||||
initData() {
|
||||
console.log(this.id);
|
||||
if(this.id !=null) {
|
||||
this.loading = true;
|
||||
getEmisSpecialCalcWeight(this.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.form.prodCodeSelArr = [this.form.lineCode,this.form.prodCode]
|
||||
console.log( this.form.prodCodeSelArr)
|
||||
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
@ -203,6 +205,7 @@ export default {
|
||||
onProductChange(item){
|
||||
this.form.lineCode=item[0];
|
||||
this.form.prodCode=item[1];
|
||||
// this.form.prodName=
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
||||
@ -8,19 +8,10 @@
|
||||
<!-- <el-form-item label="" prop="lineCode">
|
||||
<TransLinePicker :placeholder="$t('所属线路')" v-model="queryParams.lineCode" :countryCode="queryParams.country"></TransLinePicker>
|
||||
</el-form-item> -->
|
||||
<!--
|
||||
|
||||
<el-form-item label="产品类型" prop="prodCode">
|
||||
<TransProductPicker placeholder="产品类型" v-model="queryParams.prodCode" :transLineCode="queryParams.lineCode" @onChange="handleQuery"></TransProductPicker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="产品类型" prop="prodName">
|
||||
<el-input
|
||||
v-model="queryParams.prodName"
|
||||
placeholder="产品类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<TransProductCasPicker placeholder="产品类型" v-model="queryParams.prodCodeSelArr" @onChange="handleQuery" ></TransProductCasPicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="取重方式" prop="carryType">
|
||||
<el-select v-model="queryParams.carryType" :placeholder="$t('取重方式')" clearable @change="handleQuery">
|
||||
<el-option
|
||||
@ -104,7 +95,7 @@
|
||||
|
||||
<el-table-column :label="$t('产品类型')" align="left" prop="prodName" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.prodName}}</div>
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.lineName}}/{{scope.row.prodName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('取重方式')" align="center" prop="carryType" width="100" >
|
||||
@ -168,10 +159,11 @@ import emisSpecialCalcWeightForm from '@/views/emis/emisSpecialCalcWeight/emisSp
|
||||
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
||||
|
||||
export default {
|
||||
name: "emisSpecialCalcWeight",
|
||||
components: { CountryPicker,TransLinePicker,elDateSimplePicker,TransProductPicker,emisSpecialCalcWeightForm },
|
||||
components: { CountryPicker,TransLinePicker,elDateSimplePicker,TransProductPicker,emisSpecialCalcWeightForm ,TransProductCasPicker},
|
||||
dicts: [
|
||||
'sys_normal_disable',
|
||||
'emis_take_weight_method',
|
||||
@ -219,6 +211,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
prodCodeSelArr:null,
|
||||
country:null,
|
||||
lineCode:null,
|
||||
prodCode: null,
|
||||
@ -236,7 +229,16 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
listEmisSpecialCalcWeight(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
|
||||
if(this.queryParams.prodCodeSelArr){
|
||||
if(this.queryParams.prodCodeSelArr.length==2){
|
||||
this.queryParams.prodCode=this.queryParams.prodCodeSelArr[1];
|
||||
}
|
||||
}else{
|
||||
this.queryParams.prodCode=null;
|
||||
}
|
||||
|
||||
listEmisSpecialCalcWeight(this.queryParams).then(response => {
|
||||
this.emisSpecialCalcWeightList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
||||
@ -92,6 +92,13 @@
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="月结客户" prop="custNo">
|
||||
<EmisMonthpayAccountPicker v-model="queryParams.custNo" @onChange="handleQuery"></EmisMonthpayAccountPicker>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="运单状态" prop="siteType">
|
||||
<el-select v-model="queryParams.waybillStatus" placeholder="运单状态" clearable filterable>
|
||||
<el-option
|
||||
@ -481,11 +488,15 @@ import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePick
|
||||
|
||||
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
|
||||
|
||||
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
|
||||
|
||||
|
||||
import {dateToStr} from '@/utils/custom'
|
||||
|
||||
export default {
|
||||
name: "SendWaybillList",
|
||||
components: {
|
||||
EmisMonthpayAccountPicker,
|
||||
elDateAdvPicker,emisWaybillForm,
|
||||
CountryPicker1,
|
||||
CountryPicker2,ProvincePicker2,
|
||||
@ -717,6 +728,12 @@ export default {
|
||||
this.queryOrderType="1";
|
||||
this.queryOrderDateType="1";
|
||||
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setHours(0,0,0,0)
|
||||
end.setHours(23,59,59,0)
|
||||
this.dateTimeRange=[start,end];
|
||||
|
||||
// 调整表格的高度,不允许滚动
|
||||
this.$nextTick(function() {
|
||||
let queryFormEl = this.$refs.queryForm.$el;
|
||||
|
||||
@ -845,7 +845,7 @@ data() {
|
||||
],
|
||||
reciever:{
|
||||
name: [
|
||||
{ required: true, message: "收货人名不能为空", trigger: "blur" }
|
||||
{ required: true, message: "收货人名不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "收货人手机号不能为空", trigger: "blur" }
|
||||
@ -871,7 +871,7 @@ data() {
|
||||
},
|
||||
sender:{
|
||||
name: [
|
||||
{ required: true, message: "寄件人名不能为空", trigger: "blur" }
|
||||
{ required: true, message: "寄件人名不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "寄件人手机号不能为空", trigger: "blur" }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user