瀏覽代碼

订单列表

xiaohaizhao 1 年之前
父節點
當前提交
a70dc22a47
共有 5 個文件被更改,包括 857 次插入21 次删除
  1. 159 15
      components/filtrate.vue
  2. 432 4
      store/orderForm/detail.vue
  3. 255 1
      store/orderForm/index.vue
  4. 2 1
      store/orderForm/insert.vue
  5. 9 0
      utils/tool.js

+ 159 - 15
components/filtrate.vue

@@ -5,8 +5,49 @@
                 <view class="shade" catchtouchmove="true" @touchmove.stop.prevent="() => { }" @click="changeShow">
                     <view @click.stop="">
                         <scroll-view :style="{ maxHeight: tovw(maxHeight) }" class="scroll-view" scroll-y>
-                            <group v-for="(item, index) in list" :ref="'group' + index" :key="item.key" :item="item"
-                                :rowIndex="index" @onChange="onChange" />
+                            <block v-for="(item, index) in list" :key="item.key">
+                                <block v-if="item.type == 'dateRange'">
+                                    <view class="date-label">
+                                        {{ item.title || '时间区间' }}
+                                    </view>
+                                    <view class="date-box">
+                                        <scroll-view :scroll-x="true">
+                                            <view class="options">
+                                                <view class="item" hover-class="navigator-hover"
+                                                    :class="item.day == 1 ? 'active' : ''" @click="fast(1, index)">
+                                                    今天
+                                                </view>
+                                                <view class="item" hover-class="navigator-hover"
+                                                    :class="item.day == 7 ? 'active' : ''" @click="fast(7, index)">
+                                                    7天
+                                                </view>
+                                                <view class="item" hover-class="navigator-hover"
+                                                    :class="item.day == 30 ? 'active' : ''" @click="fast(30, index)">
+                                                    30天
+                                                </view>
+                                                <view style="width: 10px;" />
+                                                <u-number-box :value="item.day || 1" @change="valChange($event, index)" />
+                                            </view>
+                                        </scroll-view>
+                                        <view class="row" style="margin-top: 20px">
+                                            <picker mode="date" class="date-box"
+                                                :style="{ color: item.begindate ? '#333' : '#ddd' }" :value="item.begindate"
+                                                data-name="begindate" :end="enddate" @change="onDateChange($event, index)">
+                                                {{ item.begindate || '开始日期' }}
+                                            </picker>
+                                            <view style="padding: 0 10px;">
+                                                -
+                                            </view>
+                                            <picker mode="date" class="date-box"
+                                                :style="{ color: item.enddate ? '#333' : '#ddd' }" :value="item.enddate"
+                                                data-name="enddate" @change="onDateChange($event, index)" :start="enddate">
+                                                {{ item.enddate || '结束日期' }}
+                                            </picker>
+                                        </view>
+                                    </view>
+                                </block>
+                                <group v-else :ref="'group' + index" :item="item" :rowIndex="index" @onChange="onChange" />
+                            </block>
                         </scroll-view>
                         <view class="but-box">
                             <view class="reset" hover-class="navigator-hover" @click="onReset">
@@ -25,6 +66,7 @@
 
 <script>
 import group from "./filtrate-group.vue"
+
 export default {
     components: { group },
     props: {
@@ -54,12 +96,13 @@ export default {
         }
     },
     watch: {
-        filtrateList: function (newVal) {
-            if (newVal) {
-                this.list = JSON.parse(JSON.stringify(newVal));
-            } else {
-
-            }
+        filtrateList: {
+            handler: function (newVal) {
+                if (newVal) {
+                    this.list = JSON.parse(JSON.stringify(newVal));
+                }
+            },
+            immediate: true,
         }
     },
     data() {
@@ -67,7 +110,7 @@ export default {
             show: false,
             maxHeight: 0,
             index: -99,
-            list: []
+            list: [],
         }
     },
     methods: {
@@ -97,17 +140,48 @@ export default {
         onReset() {
             this.list = JSON.parse(JSON.stringify(this.filtrateList));
         },
+        fast(num, index) {
+            return new Promise((resolve) => {
+                let now = new Date().getTime() - 0,
+                    end = now + 86400000,
+                    beg = end - (num * 86400000);
+                this.list[index].begindate = this.formatTime(new Date(beg)).split(' ')[0];
+                this.list[index].enddate = this.formatTime(new Date(end)).split(' ')[0];
+                this.list[index].day = num;
+                resolve()
+            })
+        },
+        valChange(e, index) {
+            this.fast(e.value, index)
+        },
+        onDateChange(e, index) {
+            this[e.target.dataset.name] = e.detail.value;
+            let item = this.list[index];
+            if (item.begindate && item.enddate) {
+                let end = new Date(item.enddate).getTime(),
+                    beg = new Date(item.begindate).getTime();
+                item.day = (end - beg) / 86400000;
+            }
+            this.list[index] = item;
+        },
         onConfirm() {
             let obj = {};
             this.list.forEach(v => {
-                if (v.value || v.defaultVal) {
-                    if (v.isAll) {
-                        obj[v.key] = v.rang.find(s => s[v.selected] == v.value) || v.rang.find(s => s[v.selected] == v.defaultVal);
+                if (v.type == "dateRange") {
+                    obj[v.key] = {
+                        begindate: v.begindate,
+                        enddate: v.enddate,
+                    };
+                } else {
+                    if (v.value || v.defaultVal) {
+                        if (v.isAll) {
+                            obj[v.key] = v.rang.find(s => s[v.selected] == v.value) || v.rang.find(s => s[v.selected] == v.defaultVal);
+                        } else {
+                            obj[v.key] = v.value || v.defaultVal;
+                        }
                     } else {
-                        obj[v.key] = v.value || v.defaultVal;
+                        obj[v.key] = '';
                     }
-                } else {
-                    obj[v.key] = '';
                 }
             })
             this.$emit("onFiltration", obj)
@@ -164,4 +238,74 @@ export default {
         background: rgba($color: #000000, $alpha: .7);
     }
 }
+
+
+.date-label {
+    line-height: 22px;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: bold;
+    font-size: 16px;
+    color: #333333;
+    padding: 10px;
+}
+
+.date-box {
+    .active {
+        background: #C30D23 !important;
+        color: #FFFFFF !important;
+    }
+
+    .options {
+        display: flex;
+
+        .item {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            background: #F5F5F5;
+            border-radius: 4px;
+            margin-left: 10px;
+            font-size: 14px;
+            color: #333333;
+            overflow: hidden;
+            box-sizing: border-box;
+            padding: 6px 12px;
+            flex-shrink: 0;
+        }
+
+
+        /deep/ .u-number-box__minus,
+        /deep/.u-number-box__input,
+        /deep/.u-number-box__plus {
+            height: 30px !important;
+        }
+
+        /deep/ .u-number-box__input {
+            width: 35px !important;
+        }
+    }
+
+    .row {
+        display: flex;
+        align-items: center;
+        font-size: 14px;
+        color: #646566;
+        padding: 10px;
+        padding-top: 0;
+        border-bottom: 1px solid #ddd;
+        box-sizing: border-box;
+
+        .date-box {
+            flex: 1;
+            height: 35px;
+            line-height: 35px;
+            background: #FFFFFF;
+            border-radius: 4px;
+            border: 1px solid #CCCCCC;
+            font-size: 14px;
+            padding-left: 10px;
+        }
+    }
+
+}
 </style>

+ 432 - 4
store/orderForm/detail.vue

@@ -1,6 +1,113 @@
 <template>
     <view>
+        <navigator :url="detail.status == '待付款' ? '/store/deliveryAddress/index?title=选择地址' : '#'" @click="toSelect"
+            class="address-box" :hover-class="detail.status == '待付款' ? 'navigator-hover' : ''">
+            <view class="empty" v-if="address.rec_contactsid == 0">
+                请选择收货地址
+            </view>
+            <view class="contacts" v-else>
+                <view class="label">
+                    <text class="iconfont icon-dizhi-hui" />
+                    <text style="margin-right: 10px;">
+                        {{ address.delivery_name }}
+                    </text>
+                    <text>
+                        {{ address.delivery_phonenumber }}
+                    </text>
+                </view>
+                <view class="address">
+                    {{ getCity(address) }}
+                </view>
+            </view>
+            <view v-if="detail.status == '待付款'" class="iconfont icon-a-wodetiaozhuan" />
+        </navigator>
 
+        <view class="product">
+            <u--image :src="detail.productCover" width="86" height="80" radius="8">
+                <template v-slot:loading>
+                    <u-loading-icon color="red"></u-loading-icon>
+                </template>
+            </u--image>
+            <view class="content">
+                <view class="title u-line-1">{{ detail.itemname }}</view>
+                <view class="price-box">
+                    总计
+                    <text style="color: #E3041F;margin-left: 4px;">
+                        ¥
+                    </text>
+                    <text class="price">
+                        {{ CNY(detail.amount, '') }}
+                    </text>
+                    <text style="color: #E3041F;margin-left: 4px;">
+                        元
+                    </text>
+                </view>
+            </view>
+        </view>
+
+        <view class="store-info">
+            <view class="title">
+                门店
+            </view>
+            <view class="content">
+                <u--image width="60" height="62" radius="8" :src="detail.storeCover" lazy-load>
+                    <template v-slot:loading>
+                        <u-loading-icon color="red"></u-loading-icon>
+                    </template>
+                </u--image>
+                <view class="text-box" hover-class="navigator-hover" @click="goAtOnce(detail)">
+                    <view class="storename u-line-1" :style="{ width: detail.leader_phonenumber ? '230px' : '100%' }">
+                        {{ detail.storename }}
+                    </view>
+                    <view class="address u-line-1" :style="{ width: detail.leader_phonenumber ? '230px' : '100%' }">
+                        <text class="iconfont icon-dizhi-hui" />{{ detail.store_address }}
+                    </view>
+                    <view v-if="detail.leader_phonenumber" @click.stop="callPhone(detail.leader_phonenumber)"
+                        class="iconfont icon-dianhua" hover-class="navigator-hover" />
+                </view>
+            </view>
+        </view>
+
+        <view class="particulars">
+            <view class="row">
+                <view class="label">
+                    订单编号
+                </view>
+                <view class="value">
+                    {{ detail.sonum }} |
+                    <text class="copy" @click="copy(detail.sonum, '订单编号')">
+                        复制
+                    </text>
+                </view>
+            </view>
+
+            <view class="row">
+                <view class="label">
+                    创建时间
+                </view>
+                <view class="value">
+                    {{ detail.createdate }}
+                </view>
+            </view>
+        </view>
+
+        <view class="footer">
+            <view class="content">
+                <view class="price-box">
+                    总计:
+                    <view class="price">
+                        {{ CNY(detail.amount) }}
+                    </view>
+                </view>
+                <view class="submit" :class="address.contactsid == 0 || loading ? 'forbidden' : ''"
+                    hover-class="navigator-hover" @click="address.contactsid == 0 || loading ? '' : submit()">
+                    <u-loading-icon v-if="loading" />
+                    <block v-else>
+                        支付
+                    </block>
+                </view>
+            </view>
+        </view>
     </view>
 </template>
 
@@ -8,13 +115,334 @@
 export default {
     data() {
         return {
-
+            sa_custorderid: 0,
+            detail: {},
+            address: {
+                delivery_name: "",
+                delivery_phonenumber: "",
+                rec_contactsid: "",
+                province: "",
+                city: "",
+                county: "",
+                address: "",
+            }
         }
     },
     onLoad(options) {
-        console.log(options)
-    }
+        this.sa_custorderid = options.id;
+        this.getDetail()
+        uni.setNavigationBarTitle({
+            title: '订单详情'
+        });
+    },
+    methods: {
+        getDetail() {
+            this.$Http.basic({
+                "id": 20240429152602,
+                "content": {
+                    "sa_custorderid": this.sa_custorderid
+                },
+            }).then(res => {
+                console.log("订单详情", res)
+                res.data.storeCover = res.data.attinfos_store.length ? this.getSpecifiedImage(res.data.attinfos_store[0]) : uni.getStorageSync('site').logo || ''
+                for (const key in this.address) {
+                    this.address[key] = res.data[key]
+                }
+                res.data.productCover = res.data.attinfos.length ? this.getSpecifiedImage(res.data.attinfos.find(s => s.usetype == "sa_fad") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
+                this.detail = res.data;
+            })
+        },
+        toSelect() {
+            this.$Http.selectAddress = function (address) {
+                address.delivery_name = address.name;
+                address.delivery_phonenumber = address.phonenumber;
+                address.rec_contactsid = address.contactsid;
+                this.address = address;
+                uni.navigateBack();
+                delete this.$Http.selectAddress
+                this.loading = true;
+                this.$Http.basic({
+                    "id": 20240429152502,
+                    "content": {
+                        "sa_custorderid": this.detail.sa_custorderid,
+                        "items": [
+                            {
+                                "sa_fadid": this.detail.sa_fadid,
+                                "qty": this.detail.qty
+                            }
+                        ],
+                        "rec_contactsid": address.contactsid,
+                        "sys_enterpriseid": this.detail.sys_enterpriseid,
+                        "sa_storeid": this.detail.sa_storeid,
+                        "remarks": this.detail.remarks
+                    },
+                }).then(res => {
+                    console.log("编辑", res)
+                })
+
+            }.bind(this)
+        },
+        copy(data, title) {
+            uni.setClipboardData({
+                data,
+                success: (result) => {
+                    uni.showToast({
+                        title: "已复制" + title,
+                        icon: "none",
+                        duration: 1500,
+                    })
+                }
+            });
+        },
+        goAtOnce(item) {
+            uni.openLocation({
+                latitude: item.latitude - 0,
+                longitude: item.longitude - 0,
+                address: item.address,
+                name: item.storename,
+                success: function () {
+                    console.log('success');
+                },
+                fail: (fail) => {
+                    console.log('fail', fail)
+                },
+            });
+        },
+    },
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.address-box {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-top: 10px;
+    width: 100vw;
+    height: 64px;
+    background: #FFFFFF;
+    padding: 0 10px;
+    box-sizing: border-box;
+
+    .empty {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #333333;
+    }
+
+    .price {
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 16px;
+        color: #E3041F;
+    }
+
+    .contacts {
+        .label {
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 14px;
+            color: #000000;
+
+            .iconfont {
+                font-size: 12px;
+                color: #333333;
+                margin-right: 5px;
+            }
+        }
+
+        .address {
+            line-height: 17px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 12px;
+            color: #666666;
+            margin-top: 7px;
+        }
+    }
+
+}
+
+.product {
+    display: flex;
+    width: 100vw;
+    background: #fff;
+    padding: 10px;
+    box-sizing: border-box;
+    margin-top: 10px;
+
+    .content {
+        margin-left: 20px;
+        flex: 1;
+        height: 100%;
+
+        .title {
+            line-height: 24px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 16px;
+            color: #333333;
+            margin-top: 10px;
+        }
+
+        .price-box {
+            margin-top: 10px;
+            font-size: 12px;
+            color: #333333;
+
+            .price {
+                color: #E3041F;
+                font-size: 18px;
+                font-weight: bold;
+            }
+        }
+    }
+}
+
+.store-info {
+    background: #fff;
+    padding: 10px;
+    padding-top: 12px;
+    margin-top: 10px;
+
+    .title {
+        line-height: 22px;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+    }
+
+    .content {
+        display: flex;
+        margin-top: 11px;
+
+        .text-box {
+            position: relative;
+            flex: 1;
+            height: 62px;
+            background: #F5F5F5;
+            border-radius: 5px;
+            margin-left: 10px;
+            box-sizing: border-box;
+            padding: 10px;
+
+            .storename {
+                line-height: 20px;
+                font-family: PingFang SC, PingFang SC;
+                font-size: 14px;
+                color: #333333;
+            }
+
+            .address {
+                .iconfont {
+                    font-size: 12px;
+                    margin-right: 4px;
+                }
+
+                line-height: 17px;
+                font-family: PingFang SC,
+                PingFang SC;
+                font-size: 12px;
+                color: #888888;
+                margin-top: 5px;
+            }
+
+            .icon-dianhua {
+                position: absolute;
+                right: 20px;
+                top: 20px;
+                font-size: 20px;
+                color: #C30D23;
+            }
+        }
+    }
+}
+
+.particulars {
+    width: 100vw;
+    background: #fff;
+    margin-top: 10px;
+    padding: 10px;
+    box-sizing: border-box;
+
+    .row {
+        display: flex;
+        align-items: center;
+        margin-top: 14px;
+
+        .label {
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #333333;
+            width: 100px;
+        }
+
+        .value {
+            flex: 1;
+            text-align: right;
+            line-height: 24px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 16px;
+            color: #333333;
+
+            .copy {
+                margin-left: 5px;
+                color: #999999;
+            }
+        }
+
+    }
+
+    .row:first-child {
+        margin-top: 0;
+    }
+}
+
+.footer {
+    position: fixed;
+    width: 100vw;
+    height: 65px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    bottom: 0;
+    left: 0;
+    padding: 10px;
+    padding-top: 5px;
+    box-sizing: border-box;
+
+    .content {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        height: 45px;
+        width: 100%;
+
+        .price-box {
+            display: flex;
+            font-size: 14px;
+            color: #333333;
+
+            .price {
+                color: #E3041F;
+                font-size: 16px;
+                font-weight: bold;
+            }
+        }
+
+        .submit {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            width: 100px;
+            height: 45px;
+            background: #C30D23;
+            border-radius: 5px;
+            font-family: PingFang SC, PingFang SC;
+            font-size: 14px;
+            color: #FFFFFF;
+        }
+    }
+
+}
+</style>

+ 255 - 1
store/orderForm/index.vue

@@ -1,13 +1,267 @@
 <template>
     <view>
+        <u-tabs :list="types" :activeStyle="{ fontWeight: 'bold', color: '#C30D23' }" lineColor="#C30D23"
+            @change="changeStatus" />
+        <view class="date-box">
+            <view class="date" @click="openFilter">
+                <text class="iconfont icon-sousuo" />
+                起始:
+                <text class="value">
+                    {{ content.where.begindate_create || '' }}
+                </text>
+            </view>
+            <view class="date" @click="openFilter">
+                <text class="iconfont icon-sousuo" />
+                结束:
+                <text class="value">
+                    {{ content.where.enddate_create || '' }}
+                </text>
+            </view>
+            <view class="search" @click.stop="setSearchShow">
+                <text class="iconfont icon-sousuo" />
+            </view>
+        </view>
+        <u-transition :show="searchShow">
+            <view class="My_search-box">
+                <My_search :value="content.where.condition" @onSearch="onSearch">
+                    <view class="cancel" v-if="content.where.condition" hover-class="navigator-hover" @click="onSearch('')">
+                        取消
+                    </view>
+                    <view v-else style="width: 5px;" />
+                </My_search>
+            </view>
+        </u-transition>
+        <filtrate ref="Filtrate" :filtrateList="filtrateList" @onFiltration="onFiltration" />
 
+        <My_listbox ref="List" @getlist="getList">
+            <navigator v-for="item in list" :key="item.sa_custorderid" class="item"
+                :url="'/store/orderForm/detail?id=' + item.sa_custorderid" hover-class="navigator-hover">
+                <view class="sonum">
+                    订单号:{{ item.sonum }}
+                    <text :style="{ color: item.status == '待付款' ? '#E3041F' : '#666666' }">
+                        {{ item.status }}
+                    </text>
+                </view>
+
+                <view class="product">
+                    <u--image :src="item.cover" width="86" height="80" radius="8" lazy-load>
+                        <template v-slot:loading>
+                            <u-loading-icon color="red"></u-loading-icon>
+                        </template>
+                    </u--image>
+                    <view class="content">
+                        <view class="product-title u-line-1">
+                            {{ item.itemname }}
+                        </view>
+                        <view class="price">
+                            总计 <text style="color: #E3041F;">¥</text>
+                            <text style="color: #E3041F;font-size: 18px;font-weight: bold;">
+                                {{ CNY(item.price, '') }}
+                            </text>
+                            <text style="color: #E3041F;">元</text>
+                        </view>
+                    </view>
+                </view>
+                <view class="but-box" v-if="item.status == '待付款'">
+                    <view />
+                    <view class="but" hover-class="navigator-hover" hover-stop-propagation="false">
+                        付款
+                    </view>
+                </view>
+            </navigator>
+        </My_listbox>
     </view>
 </template>
 
 <script>
 export default {
+    data() {
+        return {
+            types: [
+                { name: "全部" },
+                { name: "待付款" },
+                { name: "已付款" },
+            ],
+            searchShow: false,
+            content: {
+                "where": {
+                    "condition": "",
+                    "status": "",
+                    "begindate_create": this.daysAgo(1).begindate,
+                    "enddate_create": this.daysAgo(1).enddate
+                }
+            },
+            list: [],
+            filtrateList: [
+                {
+                    type: "dateRange",
+                    title: "时间区间",//组名称
+                    day: 1,
+                    key: 'create',//提交时返回的Key
+                    begindate: this.daysAgo(1).begindate,
+                    enddate: this.daysAgo(1).enddate
+                }
+            ]
+        }
+    },
+    created() {
+        this.getList(true)
+        uni.setNavigationBarTitle({
+            title: '商城订单',
+        })
+    },
+    methods: {
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            this.$Http.basic({
+                "id": "20240507100302",
+                content: this.content
+            }).then(res => {
+                console.log("订单列表", res)
+                this.$refs.List.RefreshToComplete()
+                if (this.cutoff(res.msg)) return;
+                res.data = res.data.map(v => {
+                    v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sa_fad") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
+                    return v
+                })
+                this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors;
+                this.content = this.$refs.List.paging(this.content, res)
+            })
+        },
+        changeStatus({ name }) {
+            this.content.where.status = name == '全部' ? '' : name;
+            this.getList(true)
+        },
+        openFilter() {
+            this.$refs.Filtrate.changeShow();
+        },
+        onSearch(condition) {
+            if (condition == this.content.where.condition) return;
+            this.content.where.condition = condition;
+            this.getList(true);
+        },
+        onFiltration(e) {
+            this.content.where.begindate_create = e.create.begindate;
+            this.content.where.enddate_create = e.create.enddate;
+            this.getList(true);
+        },
+        setSearchShow() {
+            this.searchShow = !this.searchShow;
+            setTimeout(() => {
+                this.$refs.List.setHeight()
+            }, 300);
+        }
+    },
 
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.date-box {
+    display: flex;
+    width: 100vw;
+    background: #fff;
+    padding: 5px 16px;
+    box-sizing: border-box;
+
+    .date {
+        flex: 1;
+        line-height: 20px;
+        font-size: 14px;
+
+        .iconfont {
+            margin-right: 5px;
+            color: #707070;
+        }
+
+        .value {
+            color: #C30D23;
+        }
+    }
+
+    .search {
+        color: #999999;
+        font-size: 14px;
+        line-height: 20px;
+        padding-left: 10px;
+    }
+}
+
+.item {
+    width: 355px;
+    padding: 10px;
+    border-radius: 8px;
+    background: #fff;
+    box-sizing: border-box;
+    margin: 10px auto 0;
+
+    .sonum {
+        display: flex;
+        justify-content: space-between;
+        height: 20px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #333333;
+    }
+
+    .product {
+        display: flex;
+        margin-top: 12px;
+
+        .content {
+            margin-left: 20px;
+
+            .product-title {
+                margin-top: 10px;
+                line-height: 24px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-weight: bold;
+                font-size: 16px;
+                color: #333333;
+            }
+
+            .price {
+                margin-top: 10px;
+            }
+        }
+
+    }
+
+    .but-box {
+        display: flex;
+        justify-content: space-between;
+
+        .but {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+
+            width: 100px;
+            height: 40px;
+            background: #C30D23;
+            border-radius: 5px;
+            font-family: PingFang SC, PingFang SC;
+            font-size: 14px;
+            color: #FFFFFF;
+        }
+    }
+}
+
+.My_search-box {
+    background: #fff;
+    width: 100vw;
+    padding: 5px;
+    padding-left: 10px;
+    box-sizing: border-box;
+
+    .cancel {
+        line-height: 30px;
+        margin-left: 10px;
+        padding: 0 10px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 14px;
+        color: #666666;
+        border-radius: 4px;
+    }
+}
+</style>

+ 2 - 1
store/orderForm/insert.vue

@@ -112,6 +112,7 @@ export default {
         submit() {
             this.loading = true;
             let store = this.$refs.storeInfo.detail;
+            console.log(this.address)
             this.$Http.basic({
                 "id": 20240429152502,
                 "content": {
@@ -122,7 +123,7 @@ export default {
                             "qty": 1
                         }
                     ],
-                    "rec_contactsid": this.address.contacts,
+                    "rec_contactsid": this.address.contactsid,
                     "sys_enterpriseid": store.sys_enterpriseid,
                     "sa_storeid": store.sa_storeid,
                     "remarks": ""

+ 9 - 0
utils/tool.js

@@ -199,6 +199,15 @@ function mount() {
         }
         return obj[name] || ''
     }
+    Vue.prototype.daysAgo = num => {
+        let now = new Date().getTime() - 0,
+            end = now + 86400000,
+            beg = end - (num * 86400000);
+        return {
+            begindate: Vue.prototype.formatTime(new Date(beg)).split(' ')[0],
+            enddate: Vue.prototype.formatTime(new Date(end)).split(' ')[0],
+        }
+    }
 }
 
 module.exports = {