123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780 |
- <template>
- <view class="order-list content">
- <u-sticky bgColor="#fff" class="main-sticky">
- <view class="search-wrap">
- <view class="input-wrap">
- <view @click="showPopup('popupTenant')" class="input">
- <u--input prefixIcon="account-fill" readonly :placeholder="$t('queue.pleaseSelectTenant')"
- :prefixIconStyle="{fontSize:'46rpx',color:'#c8d8ef'}" border="none"
- v-model="form.tenantName" placeholderStyle="color:'#c8d8ef'" color="#666"
- :showAction='false'></u--input>
- </view>
- <view @click="onClickRight" class="sx-btn">
- <uni-icons type="settings-filled" size='24' color="#333"></uni-icons>
- </view>
- </view>
- </view>
- <view class="tabs-box">
- <view v-if="form.orderType != '4'">
- <u-tabs lineWidth="40" :list="orderStatusList"
- :current="form.orderStatus" @change="changeOrderStatus" lineColor="#3275F5"
- :itemStyle="{'height':'90rpx','padding':'0 32rpx'}">
- </u-tabs>
- <!-- <span :class="form.orderStatus == item.value ? 'active' : ''" v-for="item in orderStatusList"
- @click="changeOrderStatus(item)" :key="item.name">
- {{ item.name }}
- </span> -->
- </view>
- <view v-if="form.orderType == '4'">
- <u-tabs lineWidth="40" :list="shareOrderStatusList"
- :current="form.orderStatus" @change="changeOrderStatus" lineColor="#3275F5"
- :itemStyle="{'height':'90rpx','padding':'0 32rpx'}">
- </u-tabs>
- <!-- <span :class="form.orderStatus == item.value ? 'active' : ''" v-for="item in shareOrderStatusList"
- @click="changeOrderStatus(item)" :key="item.name">
- {{ item.name }}
- </span> -->
- </view>
- </view>
- <PopupSelect ref="popupTenant" :hasSearch='false' :option="tenantOption" @onConfirm="onTenantConfirm"
- @search="getOption" />
- </u-sticky>
- <!-- 企业选项 -->
- <view class="swiper-box">
- <template v-if="orderList.length">
- <u-list @scrolltolower="scrolltolower" :preLoadScreen="1.5">
- <u-list-item v-for="(item, index) in orderList" :key="index">
- <view class="order-card">
- <view class="order-card-title">
- <span class="type" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
- <span class="type fixed" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
- <span class="type fixed" v-if="item.orderType == '5'">{{ $t('order.plan') }}</span>
- <text class="info">{{ item.tenantName || '' }}</text>
- <!-- <text class="no">No {{ item.code || '' }}</text> -->
- <view class="out-type" v-if="item.backFlag == '1'">
- {{item.vehicleType=='101'?$t('order.isBackOut'):$t('order.return')}}
- </view>
- <template v-if="item.orderType != '4'">
- <span class="status" v-if="item.orderStatus == '0'">未进厂</span>
- <span class="status"
- v-if="item.orderStatus == '1' && item.weighingStatus == '0'">已进厂</span>
- <span class="status" v-if="item.orderStatus == '2'">已完成</span>
- <span class="status"
- v-if="item.orderStatus == '1' && item.weighingStatus != '0'">已过磅</span>
- <span class="status bad-status" v-if="item.orderStatus == '4'">已作废</span>
- </template>
- <template v-if="item.orderType == '4'">
- <span class="status" v-if="item.orderStatus == '0'">未接单</span>
- <span class="status" v-if="item.orderStatus == '1'">接单中</span>
- <span class="status" v-if="item.orderStatus == '2'">已完成</span>
- <span class="status bad-status"
- v-if="item.enabledMarkType =='1' || item.orderStatus == '4'">已作废</span>
- </template>
- </view>
- <view class="order-card-info">
- <view class="order-type">
- <u-tag :text="$t('order.suppOrder')" type="error" v-if="item.isMain == 1"></u-tag>
- <u-tag :text="$t('order.mixed')" type="success" v-if="item.isMain == 2"></u-tag>
- </view>
- <view class="row">
- <p class="cell">
- <!-- <text class="label">{{ $t('order.companyName') }}</text> -->
- <text class="info">{{ item.companyName || '' }}</text>
- </p>
- </view>
- <view class="row">
- <p class="cell">
- <!-- <text class="label">{{ $t('order.orderDate') }}</text> -->
- <text class="info">{{ item.setDate || '' }}</text>
- </p>
- <p class="cell">
- <text class="info"
- v-if="item.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
- <text class="info"
- v-if="item.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
- <text class="info"
- v-if="item.vehicleType == '103'">{{ $t('order.materialsOrder') }}</text>
- <text class="info"
- v-if="item.vehicleType == '104'">{{ $t('order.transferOrder') }}</text>
- </p>
- </view>
- <view class="row">
- <p class="cell">
- <!-- <text class="label">{{ $t('order.materialName') }}</text> -->
- <text class="info">{{ item.materialName || '' }}</text>
- </p>
- <p class="cell">
- <!-- <text class="label">{{ $t('order.orderNumber') }}</text> -->
- <text class="info"
- :style="'font-size: 9pt;font-weight: bold;'+(item.companyClientType=='109'?'color: green;':'color: red;')">{{ item.orderNumber || '' }}{{item.materialKind=='101' && item.companyClientType=='109'?$t('customer_meter.unitB') :(item.orderType ==
- '4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT')) }}</text>
- </p>
- </view>
- <view class="row">
- <p class="cell">
- <!-- <text class="label">{{ $t('order.driver') }}</text> -->
- <text class="info">{{ item.driver || '' }}-{{ item.phone || '' }}</text>
- </p>
- <p class="cell">
- <!-- <text class="label">{{ $t('order.vehicle') }}</text> -->
- <text class="info">{{ item.vehicle || '' }}</text>
- </p>
- </view>
- <view class="qrcode-logo" @click="drawQrcode(item)">
- <image class="img" src="/subpages/static/czzn-img/state/qrcode.png"
- mode=" scaleToFill" />
- </view>
- <!-- <view class="row" v-if="item.isMain == 1 || item.isMain == 2">
- <p class="cell">
- <text
- class="label">{{ item.isMain == 1 ? $t('order.mainOrder') : $t('order.suppOrder') }}</text>
- <text class="info used">{{ item.relationOrderCode || '' }}</text>
- </p>
- </view> -->
- <!-- <view class="row" v-if="item.orderStatus != 0 && item.weighingStatus != 0">
- <p class="cell">
- <text class="label">{{ $t('order.tareWeight') }}</text>
- <text class="info">{{ item.tareWeight || '0' }}</text>
- </p>
- <p class="cell">
- <text class="label">{{ $t('order.grossWeight') }}</text>
- <text class="info">{{ item.grossWeight || '0' }}</text>
- </p>
- </view>
- <view class="row">
- <p class="cell">
- <text class="label">{{ $t('order.netWeight') }}</text>
- <text class="info">{{ item.netWeight || '0' }}</text>
- </p>
- </view>
- <view class="row" v-if="item.orderStatus != 0 && item.weighingStatus == 1">
- <p class="cell">
- <text class="label">{{ $t('order.inTime') }}</text>
- <text class="info">{{ item.inTime || '' }}</text>
- </p>
- </view>
- <view class="row" v-if="item.orderStatus != 0 && item.weighingStatus == 2">
- <p class="cell">
- <text class="label">{{ $t('order.outTime') }}</text>
- <text class="info">{{ item.outTime || '' }}</text>
- </p>
- </view>
- <view class="row" v-if="item.orderStatus == 2">
- <p class="cell">
- <text class="label">{{ $t('order.outDate') }}</text>
- <text class="info">{{ item.outDoorTime || '' }}</text>
- </p>
- </view> -->
- </view>
- <view class="code">
- <view class="label">{{$t('spare.orderCode')}}</view>
- <view class="info">{{ item.code || '' }}</view>
- <view class="label">{{$t('order.source')}}</view>
- <view class="info"> {{$t('order.mini')}}</view>
- <!-- <view class="info"> {{getLabel(item.orderSource,orderSourceList)}}</view> -->
- </view>
- <view class="order-card-bottom">
- <view class="btn" v-if="item.orderStatus!=4">
- <button class="oper-btn" type='primary' shape="circle" color='#CCCCCC' size="small"
- @click="onOrderInfoClick(item)">
- {{ $t('mine.detail') }}
- </button>
- </view>
- <!-- <view class="btn" v-if="item.orderType==4 && item.orderStatus!=2">
- <u-button type='success' shape="circle" size="small"
- @click="onShareOrderClick(item)">
- {{$t('base.common.share')}}
- </u-button>
- </view> -->
- <!-- <view class="btn"
- v-if="item.companyClientType!='109' && item.isMixed!='0' && item.orderType == 1 && (item.orderStatus == 0 || item.orderStatus == 1) && item.vehicleType == 101 && item.materialKind == 101 && (!item.loadFlag || item.loadFlag == 0 ) && item.isMain != 1">
- <button class="oper-btn" type='warning' shape="circle" size="small"
- @click="onMixedOrderClick(item)">
- {{ $t('base.button.mixed') }}
- </button>
- </view> -->
- </view>
- </view>
- </u-list-item>
- </u-list>
- </template>
- <template v-else>
- <u-empty mode="orderTypeList" icon="https://cdn.uviewui.com/uview/empty/list.png">
- </u-empty>
- </template>
- </view>
- <u-popup :show="showSearch" :round="16" @close="showSearch = false" mode="bottom">
- <view class="search-dialog">
- <p class="dialog-title">{{ $t('base.common.condition') }}</p>
- <view class="condition-wrap">
- <view class="row">
- <uni-datetime-picker :end='maxDate' :clear-icon="false" :value="searchOption.range"
- type="daterange" @change="confirm" />
- </view>
- <!-- 输入内容 -->
- <view class="row">
- <p class="p-title">{{ $t('base.common.placeholder') }}</p>
- <u-search class="p-input" bgColor='#fff' :showAction='false'
- :placeholder="$t('base.common.inputPlaceholder')" v-model="keyword">
- </u-search>
- </view>
- <!-- <view class="row"> -->
- <!-- 选择业务类型 -->
- <!-- <p class="p-title">{{ $t('order.vehicleType') }}</p>
- <u-radio-group v-model="form.vehicleType" @change="onVehicleTypeChange" placement="row"
- class="p-input">
- <u-radio :customStyle="{ marginRight: '10px' }" v-for="item in searchOption.vehicleTypeList"
- :key="item.value" :label="item.text" :name="item.value">
- </u-radio>
- </u-radio-group>
- </view> -->
- <!-- 选择客商 -->
- <!--
- <view @click="showPopup('popupCompany')" class="row">
- <p class="p-title">{{ $t('order.companyName') }}</p>
- <u--input readonly class="p-input"
- :placeholder="`${$t('base.common.placeholderS') + $t('order.companyName')}`" border="none"
- v-model="form.dealerName"></u--input>
- </view> -->
- <!-- 选择物料
- <view @click="showPopup('popupMaterial')" class="row last-one">
- <p class="p-title">{{$t('order.materialName')}}
- </p>
- <u--input readonly :placeholder="`${$t('base.common.placeholderS')+$t('order.materialName')}`"
- border="none" v-model="form.materialName" class="p-input"></u--input>
- </view> -->
- <view @click="showPopup('popupVehicle')" class="row">
- <p class="p-title">{{ $t('order.vehicle') }}</p>
- <u--input readonly class="p-input"
- :placeholder="`${$t('base.common.placeholderS') + $t('order.vehicle')}`" border="none"
- v-model="form.vehicle"></u--input>
- </view>
- </view>
- <view class="sure-btn">
- <button class="btn" @click="bindOrderList">{{ $t('base.common.submit') }}</button>
- </view>
- </view>
- <!-- 选择供应商/客户 -->
- <PopupSelect ref="popupCompany" :hasSearch='false' :option="companyOption" @onConfirm="onCompanyConfirm" />
- <PopupSelect ref="popupVehicle" :option="vehicleOption" :hasSearch='false' @onConfirm="onVehicleConfirm" />
- <!-- 选择物料/产品-->
- </u-popup>
- <u-loading-page color="#666" loading-mode="semicircle">
- </u-loading-page>
- <u-popup :show="showQrcode" :round="16" @close="showQrcode = false" mode="center"
- :overlayStyle="{ background: '#fff' }">
- <view class="qrcode-wrap" @click="showQrcode = false">
- <uqrcode ref='ordercode' canvas-id="order-canvas" :value="currentOrder.id" :start="false" />
- <view class="info-line">
- {{ $t('mine.customer') }} : {{ currentOrder.companyName || '' }}
- </view>
- <view class="info-line">
- {{ $t('mine.mater') }} : {{ currentOrder.materialName || '' }}
- </view>
- <view class="info-line" v-if="currentOrder.vehicle">
- {{ $t('order.vehicle') }} : {{ currentOrder.vehicle || '' }}
- </view>
- <view class="info-line" v-if="currentOrder.password">
- {{ $t('order.password') }} : {{ currentOrder.password || '' }}
- </view>
- </view>
- </u-popup>
- <u-toast ref="loadingToast"></u-toast>
- </view>
- </template>
- <script>
- import {
- getOrderPage,
- cancelOrder,
- getCustomerList,
- getMeterList,
- getOption
- } from "../../api/order";
- import {
- getVehicleListByCondition
- } from "../../api/driver";
- import PopupSelect from '../../components/popup-select/index'
- import {
- getTenantCacheList,
- getVehicleType,
- getLabel
- } from '../../utils/util.js'
- import dayjs from 'dayjs'
- import {
- getDriverTenantList,
- } from "../../api/tenant.js";
- export default {
- components: {
- PopupSelect
- },
- data() {
- return {
- getLabel,
- maxDate: dayjs().format('YYYY-MM-DD'),
- searchOption: {
- range: [dayjs().add(-30, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
- vehicleTypeList: [{
- name: this.$t("mine.all"),
- disabled: false,
- value: '0',
- }, ],
- },
- loading: true, //页面加载状态
- showQrcode: false, // 二维码展示
- currentOrder: {}, //订单id
- vehicleOption: [],
- form: {
- type: "0",
- orderType: '',
- orderStatus: 0,
- tenantId: '',
- tenantName: '',
- dealerId: "", //客商
- dealerName: "", //客商
- vehicle: "",
- },
- currentOrderType: 0,
- orderTypeList: [{
- name: this.$t("mine.all"),
- disabled: false,
- value: '',
- index: 0,
- },
- {
- name: this.$t("order.temp"),
- disabled: false,
- value: '1',
- index: 1,
- },
- {
- name: this.$t("order.fixed"),
- disabled: false,
- value: '2',
- index: 2,
- },
- {
- name: this.$t("order.share"),
- disabled: false,
- value: '4',
- index: 3,
- },
- ],
- orderStatusList: [{
- name: this.$t("mine.reviewed"),
- value: '0'
- },
- {
- name: this.$t("mine.unpaid"),
- value: '1'
- },
- {
- name: this.$t("mine.ongoing"),
- value: '2'
- },
- {
- name: this.$t("mine.weigh"),
- value: '3'
- },
- {
- name: this.$t("mine.invalid"),
- value: '4'
- },
- ],
- orderSourceList: [{
- name: this.$t("order.pc"), //PC端
- value: '1'
- },
- {
- name: this.$t("order.mini"), //小程序
- value: '2'
- }, {
- name: this.$t("order.fixed"), //固定订单生成
- value: '3'
- },
- {
- name: this.$t("order.special"), //由特殊订单生成
- value: '4'
- },
- {
- name: this.$t("order.handWeigh"), //由手工过磅生成
- value: '5'
- },
- {
- name: this.$t("order.repair"), //由补录生成
- value: '6'
- },
- {
- name: this.$t("order.bath"), //由批量订单生成
- value: '7'
- },
- {
- name: this.$t("order.third"), //第三方生成
- value: '8'
- },
- {
- name: this.$t("order.share"), //共享订单
- value: '12'
- },
- {
- name: this.$t("order.plan"), //计划订单
- value: '13'
- },
- ],
- shareOrderStatusList: [{
- name: this.$t("order.waitOrderReceive"),
- value: '0'
- },
- {
- name: this.$t("order.orderReceiving"),
- value: '1'
- },
- {
- name: this.$t("order.orderReceiveComplete"),
- value: '2'
- },
- {
- name: this.$t("mine.invalid"),
- value: '4'
- }
- ],
- page: {
- pages: 1,
- size: 5,
- },
- currentOrderType: '',
- orderList: [],
- showSearch: false,
- keyword: '',
- hasMore: false,
- tenantOption: [{
- text: this.$t('base.common.noData'),
- value: null
- }], //企业选项
- companyOption: [], //客户选项
- materialOption: [{
- text: this.$t('base.common.noData'),
- value: null
- }], //物料选项
- //业务对应的客户信息
- vehicleTypeCompanyList: [],
- //客户对应的物料信息
- companyMaterialList: [],
- //业务类型对应的物料信息
- appAllMaterial: [],
- isAuditUser: false,
- isDealerUser: false,
- isDriverUser: false,
- isRefresh: false,
- };
- },
- mounted() {
- console.log("order list mounted");
- },
- onLoad(options) {
- this.isAuditUser = uni.getStorageSync('isAuditUser')
- this.isDealerUser = uni.getStorageSync('isDealerUser')
- this.isDriverUser = uni.getStorageSync('isDriverUser')
- this.form.orderStatus = options.orderStatus || '0';
- let param = {
- "statusFlag": "1"
- }
- getDriverTenantList(param).then((res) => {
- if (res.statusCode == 200 && res.data.code == 0 && res.data.data.length > 0) {
- console.log("获取到司机对应的租户信息,", res.data.data);
- uni.removeStorageSync('tenantInfo')
- uni.setStorageSync('tenantInfo', res.data.data)
- }
- this.bindTenant()
- });
- },
- onShow() {
- // this.isAuditUser = uni.getStorageSync('isAuditUser')
- // this.isDealerUser = uni.getStorageSync('isDealerUser')
- // this.isDriverUser = uni.getStorageSync('isDriverUser')
- console.log("是否需要刷新页面,", this.isRefresh);
- if (this.isRefresh == true) {
- this.searchList();
- }
- },
- methods: {
- bindVehicle() {
- let data = {}
- var that = this
- getVehicleListByCondition(data).then(res => {
- console.log("查询车号数据返回、", res);
- if (res.statusCode == 200) {
- if (res.data.data) {
- that.vehicleOption = [{
- text: that.$t('order.notSelected'),
- value: null
- }]
- res.data.data.forEach(item => {
- that.vehicleOption.push({
- text: item.vehicle,
- value: item.id
- })
- })
- console.log("查询车号返回数组、", that.vehicleOption);
- }
- }
- })
-
- },
- onVehicleConfirm(value) {
- this.form.vehicle = ''
- if (value.value) {
- this.form.vehicle = value.text
- }
- },
- //二维码弹窗
- drawQrcode(item) {
- this.currentOrder = item
- this.showQrcode = true
- console.log(this.$refs.ordercode);
- setTimeout(() => {
- this.$refs.ordercode.make()
- }, 100)
- },
- //切换订单状态
- changeOrderStatus(item) {
- if (item.value == this.form.orderStatus) {
- this.form.orderStatus = "";
- } else {
- this.form.orderStatus = item.value
- }
- this.searchList()
- },
- //获取企业选项
- bindTenant() {
- this.tenantOption = getTenantCacheList();
- if (this.tenantOption.length > 0) {
- this.form.tenantId = this.tenantOption[0].value
- this.form.tenantName = this.tenantOption[0].text
- } else {
- uni.showToast({
- title: this.$t('driver.dealerNoBindVehicle'),
- icon: 'none',
- duration: 2000
- })
- this.loading = false;
- return;
- }
- this.bindVehicle();
- this.searchList();
- },
- //去订单详情
- onOrderInfoClick(item) {
- if (item.orderType == '1') {
- if (item.isMain == "2") {
- uni.navigateTo({
- url: `/subpages/order/mixedOrderInfo?userType=4&orderId=${item.id}&tenantId=${item.tenantId}&orderStatus=${item.orderStatus}`
- })
- } else {
- uni.navigateTo({
- url: `/subpages/order/orderInfo?orderId=${item.id}&tenantId=${item.tenantId}`
- })
- }
- } else if (item.orderType == '2') {
- uni.navigateTo({
- url: `/subpages/order/fixedOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}`
- })
- } else if (item.orderType == '4') {
- uni.navigateTo({
- url: `/subpages/order/shareOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}`
- })
- } else if (item.orderType == '5') {
- uni.navigateTo({
- url: `/subpages/order/planOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}`
- })
- }
- },
- //拼车
- onMixedOrderClick(item) {
- uni.navigateTo({
- url: `/subpages/order/mixed?orderId=${item.id}&tenantId=${item.tenantId}`
- })
- },
- //确定选择日期
- confirm(item) {
- this.searchOption.range = item
- },
- //点击右侧筛选
- onClickRight() {
- this.showSearch = true
- },
- //搜索列表
- searchList() {
- this.page.pages = 1
- this.hasMore = false
- this.isRefresh = false
- this.bindOrderList()
- },
- //获取订单列表
- bindOrderList() {
- var that = this;
- if (!that.form.tenantId) {
- uni.showToast({
- title: that.$t("base.common.placeholderS") + that.$t("base.common.tenant"),
- icon: 'none',
- duration: 2000
- })
- return;
- }
- that.showSearch = false
- let data = {
- appUserType: "4",
- current: that.page.pages,
- size: that.page.size,
- orderStatus: that.form.orderStatus,
- keywords: that.keyword || '',
- startDate: that.searchOption.range[0] || '',
- endDate: that.searchOption.range[1] || '',
- // orderType: '1',
- tenantId: that.form.tenantId || '',
- dealerId: that.form.dealerId,
- vehicle: that.form.vehicle || '',
- };
- getOrderPage(data).then((res) => {
- if (res.statusCode == 200) {
- // that.orderList = res.data.data.records;
- if (res.data.data.records.length == 0) {
- that.orderList = []
- }
- if (that.hasMore) {
- that.orderList = [
- ...that.orderList,
- ...res.data.data.records,
- ];
- } else {
- that.orderList = res.data.data.records;
- }
- that.total = res.data.data.total;
- if (that.orderList.length >= that.total) {
- that.hasMore = false;
- } else {
- that.hasMore = true;
- }
- console.log("当前订单信息、", that.orderList);
- }
- that.loading = false;
- });
- },
- //加载更多
- scrolltolower() {
- console.log("1111111111111111");
- if (this.hasMore) {
- this.page.pages += 1;
- this.bindOrderList();
- }
- },
- // tab栏切换
- orderStatusChange(item) {
- this.orderStatus = item.orderStatus;
- this.page.pages = 1;
- this.hasMore = false;
- this.bindOrderList();
- },
- //订单作废
- onCancelOrder(item) {
- let _this = this
- uni.showModal({
- content: '确认作废此订单',
- showCancell: true,
- success: function(res) {
- if (res.confirm) {
- let data = {
- tenantId: item.tenantId,
- orderId: item.id
- };
- _this.$refs.loadingToast.show({
- type: "loading",
- message: that.$t('base.common.loading'),
- duration: "1000000"
- })
- cancelOrder(data).then(res => {
- _this.$refs.loadingToast.hide()
- if (res.statusCode == 200) {
- uni.showToast({
- title: '作废成功',
- icon: 'none',
- duration: 2000
- })
- _this.page.pages = 1
- _this.hasMore = false
- _this.bindOrderList()
- }
- }).catch(res => {
- _this.$refs.loadingToast.hide()
- })
- console.log('用户点击确定');
- } else if (res.cancell) {
- _this.$refs.loadingToast.hide()
- console.log('用户点击取消');
- }
- }
- });
- },
- onShareOrderClick(item) {
- uni.navigateTo({
- url: `/subpages/order/shareOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}&isShare=1`
- })
- },
- //显示选择
- showPopup(refs) {
- this.$refs[refs].showPicker = true
- },
- //选择企业
- onTenantConfirm(value) {
- this.form.tenantId = ''
- this.form.tenantName = ''
- if (value.value) {
- this.form.tenantId = value.value
- this.form.tenantName = value.text
- }
- uni.setStorageSync("currentTenantId", value);
- this.bindOrderList()
- },
- //选择客户
- onCompanyConfirm(value) {
- this.form.dealerId = ''
- this.form.dealerName = ''
- if (value.value) {
- this.form.dealerId = value.value
- this.form.dealerName = value.text
- }
- },
- clear() {
- },
- },
- };
- </script>
- <style>
- /* #ifndef APP-NVUE */
- page {
- background-color: #f5f7fa;
- }
- /* #endif */
- </style>
- <style lang="scss" scoped>
- @import '../../common/css/public.scss';
- </style>
|