-
zhangwei
2025-03-24 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56
src/pages/delivergoods/reservation.vue
@@ -14,16 +14,20 @@
            <view class="coreshop-ff chuany-bradius20">
               <view class="chuany-font26">
                  <view class="chuany-flex chuany-justify-between">
                  <view class="chuany-flex chuany-justify-between chuany-align-center">
                     <text class="chuany-width5">{{index+1}}</text>
                     <view class="chuany-width15">
                     <view class="chuany-width12">
                        {{$util.formatDate(item.createTime,'riqi')}}
                     </view>
                     <view class="chuany-width65">
                     <view class="chuany-width16">
                        <u-text size='14' :text="item.sentStaff.name" lines="1">
                        </u-text>
                     </view>
                     <view class="chuany-width55">
                        <u-text size='14' :text="item.remark" lines="1">
                        </u-text>
                     </view>
                     <u-text align="right" size='14' type="error" text="未受理" @click='accept(item)'>
                     <u-text align="right" size='13' type="error" text="未受理" @click='accept(item)'>
                     </u-text>
                  </view>
                  <view class="c-p-t-8">
@@ -46,8 +50,8 @@
               <!-- <up-input v-model="arrangeInfo.deliverTime" readonly border="none"
                  placeholder="点击选择工作日期"></up-input> -->
               <up-datetime-picker hasInput @confirm='confirmDate' :show="shougHuoshow" v-model="deliverTime"
                  mode="date" placeholder="点击选择工作日期" :minDate='Number(new Date(minDate))'
                  @cancel='() => shougHuoshow = false'></up-datetime-picker>
                  disabled disabledColor='#FFF' mode="date" placeholder="点击选择工作日期"
                  :minDate='Number(new Date(minDate))' @cancel='() => shougHuoshow = false'></up-datetime-picker>
            </up-form-item>
            <up-form-item label="排序" prop="sort" required :borderBottom='false' ref="item1">
               <up-input v-model="arrangeInfo.sort" placeholder="请输入排序" border="none" type="number">
@@ -58,12 +62,19 @@
               <up-input v-model="arrangeInfo.driverName" disabled border="none" disabledColor="#ffffff"
                  placeholder="请选择司机"></up-input>
            </up-form-item>
            <up-form-item label="收货单位" prop="companyName" required :borderBottom='false' ref="item1">
               <up-input v-model="arrangeInfo.companyName" placeholder="请选择收货单位" border="none">
            <up-form-item label="收货单位" prop="companyName" labelPosition='top' required :borderBottom='false'
               ref="item1" v-if='show7'>
               <tem-select ref="formSelect" placeholder="请选择收货单位" :selectedId="arrangeInfo.buyerId" :value='arrangeInfo.companyName' :search='true'
                  :localdata="customerList" @change="selectChange"></tem-select>
               <!-- <tem-selects-fan placeholder="请选择收货单位" :data="customerList" :clearable='true'
                  :value="arrangeInfo.companyName" :value-type="valueType" :filterable='true' :searchType='1'
                  @input='selectChange'></tem-selects-fan> -->
               <!-- <up-input v-model="arrangeInfo.companyName" placeholder="请选择收货单位" border="none">
                  <template #suffix>
                     <up-button @tap="clickAction" text="点击选择" type="primary" size="mini"></up-button>
                  </template>
               </up-input>
               </up-input> -->
            </up-form-item>
            <up-form-item label="联系人" prop="lianxiren" :borderBottom='false' ref="item1">
               <up-input v-model="arrangeInfo.lianxiren" border="none" placeholder="请输入联系人"></up-input>
@@ -94,6 +105,10 @@
   export default {
      data() {
         return {
            valueType: {
               label: 'companyName',
               value: 'keyid'
            },
            rules: {
               'deliverTime': {
                  type: 'string',
@@ -110,7 +125,7 @@
               'companyName': {
                  type: 'string',
                  required: true,
                  message: '请填写公司',
                  message: '请选择或填写送货单位',
                  trigger: ['blur', 'change']
               },
               'dianhua': {
@@ -172,7 +187,7 @@
            maxDate: this.$util.formatDate(new Date(), null, 7),
            deliverTime: Number(new Date(this.$util.formatDate(new Date(), null, 1))),
            driverList: [],
            customerList:[],
            customerList: [],
            showActions: false,
            driverName: '',
            actions: []
@@ -205,6 +220,18 @@
      },
      methods: {
         selectChange(item) {
            if (typeof item == 'object') {
               this.buyerName = item.name
               this.arrangeInfo.buyerId = item.keyid
               this.arrangeInfo.dizhi = item.adder
               this.arrangeInfo.dianhua = item.companyPhone
               this.arrangeInfo.lianxiren = item.businessManagers
               this.arrangeInfo.companyName = item.companyName
            } else {
               this.arrangeInfo.companyName = item
            }
         },
         Getdrivers() {
            this.$api.Getdrivers().then(res => {
               if (res.code == 1) {
@@ -217,7 +244,7 @@
         },
         confirmDate(val) {
            console.log(val);
            this.arrangeInfo.deliverTime = val
            this.arrangeInfo.deliverTime = this.$util.formatDate(val.value)
            this.shougHuoshow = false
         },
         cancelModal() {
@@ -229,9 +256,10 @@
               remark: '',
               lianxiren: '',
               dizhi: '',
               driverName: '',
               deliverTixingId: '',
               sort:'1'
               sort: 1,
               driverName:'',
               companyName: '',
            }
            this.show7 = false
            this.driverName = ''
@@ -259,6 +287,8 @@
                  this.customerList = res.data
                  this.customerList.forEach(item => {
                     item.name = item.companyName
                     item.title = item.companyName
                     item.id = item.keyid
                  })
               }
            })
@@ -311,7 +341,9 @@
                           lianxiren: '',
                           dizhi: '',
                           deliverTixingId: '',
                           sort:'1'
                           sort: 1,
                           driverName:'',
                           companyName: '',
                        }
                        this.show7 = false
                        this.driverName = ''
@@ -336,6 +368,10 @@
                        remark: '',
                        lianxiren: '',
                        dizhi: '',
                        deliverTixingId: '',
                        sort: 1,
                        driverName:'',
                        companyName: '',
                     }
                     this.show7 = false
                     this.driverName = ''