819527061@qq.com
2024-03-12 217808e8c83d7d665aea720b0d59a4085e7012e1
pages/loadUnload-page/selectTarget/selectTarget.vue
@@ -23,10 +23,26 @@
            <u-cell-group>
               <u-cell :title="dataForm.secondClass"
                  value="请选择"
                  @click="secondClassSelect">
                  @click="secondClassSelect"
                  :disabled="!dataForm.firstClass">
                  <u-icon name="arrow-right"
                     slot="right-icon"
                     size="30"></u-icon></u-cell>
            </u-cell-group>
         </u-form-item>
         <u-form-item label="磅单"
            prop="orderType"
            :borderBottom="false">
            <u-cell-group>
               <u-cell :title="dataForm.orderType"
                  :value="isOrderType"
                  @click="orderTypeSelect">
                  <view slot="right-icon"
                     @click.stop="cleanOrderType">
                     <u-icon :name="!dataForm.orderType?'arrow-right':'close-circle'"
                        size="30"></u-icon>
                  </view>
               </u-cell>
            </u-cell-group>
         </u-form-item>
      </u--form>
@@ -64,6 +80,13 @@
         :closeOnClickOverlay='true'
         @close='secondClassClose'
         @select="secondClassSelectClick"></u-action-sheet>
      <!--磅单类型 -->
      <u-action-sheet :actions="orderTypeList"
         :show="orderTypeShow"
         cancelText='取消'
         :closeOnClickOverlay='true'
         @close='orderTypeClose'
         @select="orderTypeSelectClick"></u-action-sheet>
   </view>
</template>
@@ -74,6 +97,7 @@
            dataForm: {
               firstClass: "",
               secondClass: "",
               orderType: ''
            },
            index: '',
            // 煤场操作菜单
@@ -86,7 +110,20 @@
            checkedCoal: [],
            userInfo: {},
            filedId: "",
            selectedCoal: []
            selectedCoal: [],
            orderTypeShow: false,
            orderTypeList: [{
                  name: '外销',
                  id: Math.floor(Math.random() * 100) + 1,
               },
               {
                  name: '外购',
                  id: Math.floor(Math.random() * 100) + 1,
               }
            ],
            isOrderType: '请选择', //磅房类型是否选择了 选择了清空
            cleanIconClick: true, //修改点击清空磅房选择会出现
         };
      },
      methods: {
@@ -146,6 +183,22 @@
               }
            })
         },
         orderTypeSelect() {
            this.orderTypeShow = true
         },
         orderTypeClose() {
            this.orderTypeShow = false
         },
         orderTypeSelectClick(val) {
            this.orderTypeShow = false
            this.dataForm.orderType = val.name
            this.isOrderType = ''
         },
         cleanOrderType() {
            this.dataForm.orderType = null
            this.isOrderType = '请选择'
            this.orderTypeShow = false
         },
         checkboxChange(e) {
            this.selectedCoal = e
         },
@@ -154,11 +207,10 @@
            if (this.selectedCoal.length === 0) return this.$u.toast('请选择煤种')
            this.$reqPost('updateUser', Object.assign(this.userInfo, {
               responsibilityCoal: this.selectedCoal.join(),
               filedId: this
                  .filedId
               filedId: this.filedId
            }), 'json').then(res => {
               uni.navigateTo({
                  url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail`
                  url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?orderType=${this.dataForm.orderType}`
               })
            })
         }