panhui há 5 anos atrás
pai
commit
d8031afad0

+ 1 - 1
project.config.json

@@ -130,7 +130,7 @@
                 {
                     "id": -1,
                     "name": "清单",
-                    "pathName": "pagesMine/OrderDetail",
+                    "pathName": "pagesMine/Order",
                     "query": "id=32117",
                     "scene": null
                 },

+ 30 - 4
src/components/Order.vue

@@ -1,8 +1,15 @@
 <template>
-    <div class="order-info" @click="navigateTo('/pagesMine/OrderDetail?id=' + info.id)">
+    <div
+        class="order-info"
+        @click="
+            navigateTo(
+                (info.number ? '/pagesMine/ProductsTransactionEdit?id=' : '/pagesMine/OrderDetail?id=') + info.id
+            )
+        "
+    >
         <div class="order-info-top">
             <div class="num">{{ num }}</div>
-            <div class="text">{{ info.name }}</div>
+            <div class="text">{{ info.name || info.chName }}</div>
         </div>
         <div class="order-info-content">
             <van-cell-group :border="false">
@@ -10,6 +17,19 @@
                 <van-cell :border="false" :title="$t('chan-pin-lei-bie')" :value="productCategory" />
                 <van-cell :border="false" :title="$t('ying-yong-ling-yu')" :value="applicationField" />
                 <van-cell :border="false" :title="$t('chan-pin-miao-shu')" :value="info.introduction" />
+                <van-cell
+                    :border="false"
+                    :title="$t('jiao-yi-gong-si')"
+                    v-if="info.transactionCompany"
+                    :value="info.transactionCompany"
+                />
+                <van-cell
+                    :border="false"
+                    :title="$t('jiao-yi-shi-jian')"
+                    v-if="info.transactionTime"
+                    :value="info.transactionTime"
+                />
+                <van-cell :border="false" :title="$t('jiao-yi-jia-ge')" v-if="info.price" :value="info.price" />
             </van-cell-group>
         </div>
     </div>
@@ -41,7 +61,13 @@ export default {
             }
         },
         applicationField() {
-            if (this.info.applicationField) {
+            if (this.info.application && this.info.chName) {
+                return [...this.info.application]
+                    .map(item => {
+                        return this.getName(item);
+                    })
+                    .join(',');
+            } else if (this.info.applicationField) {
                 return [...this.info.applicationField]
                     .map(item => {
                         return this.getName(item);
@@ -100,7 +126,7 @@ export default {
     --cell-text-color: #565b66;
     .van-cell__title {
         flex-grow: 0;
-        min-width: 48px;
+        min-width: 60px;
     }
     .van-cell__value {
         text-align: left;

+ 27 - 21
src/components/select/ProductCategory.vue

@@ -19,24 +19,26 @@
                 <h3>{{ $t('xuan-ze-gan-xing-qu-de-chan-pin') }}</h3>
                 <van-button :color="$colors.warn" plain @click="submit">{{ $t('que-ding') }}</van-button>
             </div>
-            <van-cell-group :border="false">
-                <block v-for="item in showList" :key="item.id">
-                    <van-cell
-                        @click="chooseList(item)"
-                        :border="false"
-                        :custom-class="nowChooseList.includes(item.id) ? 'active' : ''"
-                        :is-link="item.children && item.children.length > 0"
-                    >
-                        <h3 @click.stop="chooseList(item)" class="fontNormal" slot="title">{{ getName(item) }}</h3>
-                        <van-icon
-                            slot="right-icon"
-                            :size="24"
-                            v-if="nowChooseList.includes(item.id)"
-                            name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_oudlined_xuanzhong.png"
-                        />
-                    </van-cell>
-                </block>
-            </van-cell-group>
+            <scroll-view scroll-x scroll-y class="industry-bottom">
+                <van-cell-group :border="false">
+                    <block v-for="item in showList" :key="item.id">
+                        <van-cell
+                            @click="chooseList(item)"
+                            :border="false"
+                            :custom-class="nowChooseList.includes(item.id) ? 'active' : ''"
+                            :is-link="item.children && item.children.length > 0"
+                        >
+                            <h3 @click.stop="chooseList(item)" class="fontNormal" slot="title">{{ getName(item) }}</h3>
+                            <van-icon
+                                slot="right-icon"
+                                :size="24"
+                                v-if="nowChooseList.includes(item.id)"
+                                name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_oudlined_xuanzhong.png"
+                            />
+                        </van-cell>
+                    </block>
+                </van-cell-group>
+            </scroll-view>
         </van-popup>
     </div>
 </template>
@@ -118,9 +120,6 @@ export default {
     mounted() {
         this.$http.get('/productCategory/tree').then(res => {
             this.list = getArray(res, '', 3);
-            this.$nextTick(() => {
-                console.log(this.list);
-            });
         });
     },
     methods: {
@@ -262,4 +261,11 @@ export default {
         }
     }
 }
+
+.industry-bottom {
+    height: 300px;
+    width: 100%;
+    padding-bottom: calc(8px + constant(safe-area-inset-bottom));
+    padding-bottom: calc(8px + env(safe-area-inset-bottom));
+}
 </style>

+ 28 - 25
src/components/select/ProductCategoryOnly.vue

@@ -16,7 +16,7 @@
                 <div class="left-icon">
                     <van-icon v-if="headerInfo" color="#5E636D" @click="back" :size="24" name="arrow-left" />
                 </div>
-                <h3>{{ $t('xuan-ze-gan-xing-qu-de-chan-pin') }}</h3>
+                <h3>{{ $t('chan-pin-lei-bie') }}</h3>
                 <van-icon
                     v-if="size === 'small'"
                     :color="valueInfo ? $colors.warn : '#878D99'"
@@ -24,24 +24,26 @@
                     name="arrow-down"
                 />
             </div>
-            <van-cell-group :border="false">
-                <block v-for="item in showList" :key="item.id">
-                    <van-cell
-                        @click="chooseList(item)"
-                        :border="false"
-                        :custom-class="item.id === chooseId ? 'active' : ''"
-                        :is-link="item.children && item.children.length > 0"
-                    >
-                        <h3 @click.stop="chooseList(item)" class="fontNormal" slot="title">{{ getName(item) }}</h3>
-                        <van-icon
-                            slot="right-icon"
-                            :size="24"
-                            v-if="item.id === chooseId"
-                            name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_oudlined_xuanzhong.png"
-                        />
-                    </van-cell>
-                </block>
-            </van-cell-group>
+            <scroll-view scroll-x scroll-y class="industry-bottom">
+                <van-cell-group :border="false">
+                    <block v-for="item in showList" :key="item.id">
+                        <van-cell
+                            @click="chooseList(item)"
+                            :border="false"
+                            :custom-class="item.id === chooseId ? 'active' : ''"
+                            :is-link="item.children && item.children.length > 0"
+                        >
+                            <h3 @click.stop="chooseList(item)" class="fontNormal" slot="title">{{ getName(item) }}</h3>
+                            <van-icon
+                                slot="right-icon"
+                                :size="24"
+                                v-if="item.id === chooseId"
+                                name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_oudlined_xuanzhong.png"
+                            />
+                        </van-cell>
+                    </block>
+                </van-cell-group>
+            </scroll-view>
         </van-popup>
     </div>
 </template>
@@ -124,12 +126,6 @@ export default {
     },
     methods: {
         chooseList(info) {
-            // if (this.nowChooseList.includes(info.id)) {
-            //     const _list = [...this.nowChooseList];
-            //     _list.splice(_list.indexOf(info.id), 1);
-            //     this.nowChooseList = _list;
-            //     return;
-            // }
             if (info.children && info.children.length > 0) {
                 this.chooseId = info.id;
             } else {
@@ -257,4 +253,11 @@ export default {
         }
     }
 }
+
+.industry-bottom {
+    height: 300px;
+    width: 100%;
+    padding-bottom: calc(8px + constant(safe-area-inset-bottom));
+    padding-bottom: calc(8px + env(safe-area-inset-bottom));
+}
 </style>

+ 21 - 2
src/locales/en.json

@@ -231,7 +231,7 @@
   "chan-pin-ming-cheng": "Product name",
   "qing-shu-ru-chan-pin-ming-cheng": "Pls input product name",
   "qing-shu-ru-pin-pai-ming-cheng": "Pls input brand",
-  "chan-pin-miao-shu": "Product discription",
+  "chan-pin-miao-shu": "Discription",
   "qing-jian-yao-miao-shu-nin-de-chan-pin-100-zi-yi-nei": "Pls input product description, max of 100 characters.",
   "ti-jiao": "Submit",
   "qing-xuan-ze-chan-pin-lei-bie": "Pls select product category",
@@ -432,5 +432,24 @@
   "sou-suo-no-1": "Search related product of ",
   "sou-suo-no-2": "Search related company of ",
   "sou-suo-no-3": "Search related information of ",
-  "xin-zeng-xu-qiu-cheng-jiao-dan": "Requirement List/Deal Edit"
+  "xin-zeng-xu-qiu-cheng-jiao-dan": "Requirement List/Deal Edit",
+  "bian-hao": "Serial number",
+  "chan-pin-jiao-yi-deng-ji": "Deal record",
+  "chu-jing-bei-an-dan-hao": "Exit record No.",
+  "hai-guan-bian-ma": "HS code of Customs",
+  "hai-guan-bian-ma-ge-shi-cuo-wu": "Format error",
+  "jiao-yi-gong-si": "Deal partner",
+  "jiao-yi-jia-ge": "Value",
+  "jiao-yi-shi-jian": "Date of the deal",
+  "jin-jing-bei-an-dan-hao": "Entry record No.",
+  "jin-kou-bao-guan-dan-hao": "Customs declaration No.",
+  "qing-shu-ru-10-wei-hai-guan-bian-ma": "Pls input 10-digit HS code",
+  "qing-shu-ru-18-wei-bian-hao": "Pls input 18-digit code",
+  "qing-shu-ru-18-wei-shu-zi-chu-jing-bei-an-dan-hao": "Pls input 18-digit code of Exit record No.",
+  "qing-shu-ru-18-wei-shu-zi-jin-kou-bao-guan-dan-hao": "Pls input 18-digit code of Customs declaration No.",
+  "qing-shu-ru-chan-pin-xing-hao": "Pls input model",
+  "qing-shu-ru-huo-zhi": "Pls input cargo value",
+  "qing-shu-ru-jiao-yi-gong-si": "Pls input the deal partner",
+  "qing-xuan-ze-jiao-yi-shi-jian": "Pls select date of the deal",
+  "chan-pin-xu-qiu-qing-dan": "Requirement List"
 }

+ 16 - 1
src/locales/zh.json

@@ -436,5 +436,20 @@
   "sou-suo-no-1": "搜索",
   "sou-suo-no-2": "搜索",
   "sou-suo-no-3": "搜索",
-  "xin-zeng-xu-qiu-cheng-jiao-dan": "产品需求/成交单编辑"
+  "xin-zeng-xu-qiu-cheng-jiao-dan": "产品需求/成交单编辑",
+  "jiao-yi-shi-jian": "交易时间",
+  "jiao-yi-jia-ge": "货值",
+  "bian-hao": "编号",
+  "hai-guan-bian-ma": "海关编码",
+  "jin-kou-bao-guan-dan-hao": "进口报关单号",
+  "chu-jing-bei-an-dan-hao": "出境备案单号",
+  "qing-shu-ru-18-wei-bian-hao": "请输入18位编号",
+  "qing-shu-ru-10-wei-hai-guan-bian-ma": "请输入10位海关编码",
+  "qing-xuan-ze-jiao-yi-shi-jian": "请选择交易时间",
+  "hai-guan-bian-ma-ge-shi-cuo-wu": "海关编码格式错误",
+  "qing-shu-ru-18-wei-shu-zi-jin-kou-bao-guan-dan-hao": "请输入18位数字进口报关单号",
+  "qing-shu-ru-18-wei-shu-zi-chu-jing-bei-an-dan-hao": "请输入18位数字出境备案单号",
+  "qing-shu-ru-huo-zhi": "请输入货值",
+  "jin-jing-bei-an-dan-hao": "进境备案单号",
+  "chan-pin-xu-qiu-qing-dan": "产品需求清单"
 }

+ 27 - 21
src/pages/Home.vue

@@ -371,31 +371,37 @@ export default {
             });
         }
     },
-    onLoad() {
-        getBanner('HOME', !this.isChinese).then(res => {
-            console.log(res);
-            this.banners = res;
-        });
+    onLoad(options) {
+        if (options.local === 'en') {
+            this.$i18n.set('en');
+            this.checkTabBar();
+        }
+        this.$nextTick(() => {
+            getBanner('HOME', !this.isChinese).then(res => {
+                console.log(res);
+                this.banners = res;
+            });
 
-        this.$http.get('/hotProduct/show').then(res => {
-            this.hotLoading = false;
-            this.hotProducts = res;
-        });
+            this.$http.get('/hotProduct/show').then(res => {
+                this.hotLoading = false;
+                this.hotProducts = res;
+            });
 
-        this.$http.get('/vendorInfo/home').then(res => {
-            let _list = new Map();
-            res.forEach((item, index) => {
-                let key = Math.floor(index / 9);
-                if (_list.has(key)) {
-                    _list.get(key).push(item);
-                } else {
-                    _list.set(key, [item]);
-                }
+            this.$http.get('/vendorInfo/home').then(res => {
+                let _list = new Map();
+                res.forEach((item, index) => {
+                    let key = Math.floor(index / 9);
+                    if (_list.has(key)) {
+                        _list.get(key).push(item);
+                    } else {
+                        _list.set(key, [item]);
+                    }
+                });
+                console.log(_list);
+                this.vendorInfos = [..._list.values()];
             });
-            console.log(_list);
-            this.vendorInfos = [..._list.values()];
+            this.getData();
         });
-        this.getData();
     },
     onShow() {
         this.$store.dispatch('getUnreadNumber');

+ 55 - 24
src/pagesMine/Order.vue

@@ -1,6 +1,6 @@
 <config>
 {
-'navigationBarTitleText': '产品需求/成交单',
+'navigationBarTitleText': '',
 'backgroundColorTop': '#fff',
 'backgroundColor':'#f5f7fa'
 }
@@ -9,18 +9,28 @@
     <div>
         <van-sticky>
             <div class="top">
-                <div class="tabs">
-                    <block v-for="(item, index) in productListType" :key="index">
+                <scroll-view scroll-x class="scroll-view">
+                    <div class="tabs">
+                        <block v-for="(item, index) in productListType" :key="index">
+                            <div
+                                class="tab"
+                                v-if="!(noOwn && item.key === 'OWN_PRODUCT')"
+                                @click="chooseTab(item.key)"
+                                :class="{ active: type === item.key }"
+                            >
+                                {{ $t(item.name) }}
+                            </div></block
+                        >
+
                         <div
                             class="tab"
-                            v-if="!(noOwn && item.key === 'OWN_PRODUCT')"
-                            @click="chooseTab(item.key)"
-                            :class="{ active: type === item.key }"
+                            @click="chooseTab('ProductsTransaction')"
+                            :class="{ active: type === 'ProductsTransaction' }"
                         >
-                            {{ $t(item.name) }}
-                        </div></block
-                    >
-                </div>
+                            {{ $t('chan-pin-xu-qiu-qing-dan') }}
+                        </div>
+                    </div>
+                </scroll-view>
 
                 <!-- <van-button size="small" :color="$colors.warn" plain>编辑</van-button> -->
             </div>
@@ -37,17 +47,12 @@
                 <order v-for="(item, index) in list" :index="index" :key="item.id" :info="item"></order>
             </div>
             <fixed-button v-if="!empty && !(isVendor && type === 'OWN_PRODUCT')">
-                <van-button block :color="$colors.warn" @click="navigateTo('/pagesMine/OrderDetail?type=' + type)">
+                <van-button block :color="$colors.warn" @click="goAdd">
                     {{ $t('xin-zeng') }}
                 </van-button>
             </fixed-button>
             <template slot="emptyButton">
-                <van-button
-                    v-if="!(isVendor && type === 'OWN_PRODUCT')"
-                    block
-                    :color="$colors.warn"
-                    @click="navigateTo('/pagesMine/OrderDetail?type=' + type)"
-                >
+                <van-button v-if="!(isVendor && type === 'OWN_PRODUCT')" block :color="$colors.warn" @click="goAdd">
                     {{ $t('xin-zeng') }}
                 </van-button>
             </template>
@@ -88,13 +93,22 @@ export default {
             });
         },
         listQuery() {
-            return {
-                query: {
-                    userId: this.userInfo ? this.userInfo.id : '',
-                    type: this.type,
-                    del: false
-                }
-            };
+            if (this.type === 'ProductsTransaction') {
+                return {
+                    query: {
+                        userId: this.userInfo ? this.userInfo.id : '',
+                        del: false
+                    }
+                };
+            } else {
+                return {
+                    query: {
+                        userId: this.userInfo ? this.userInfo.id : '',
+                        type: this.type,
+                        del: false
+                    }
+                };
+            }
         },
         typeName() {
             return productListType.get(this.type);
@@ -129,6 +143,11 @@ export default {
         chooseTab(type) {
             if (type !== this.type) {
                 this.type = type;
+                if (type === 'ProductsTransaction') {
+                    this.url = '/productsTransaction/all';
+                } else {
+                    this.url = '/productList/all';
+                }
                 this.refreash();
             }
         },
@@ -137,6 +156,13 @@ export default {
                 this.chooseTab('REQUIRED_PRODUCT');
                 this.noOwn = true;
             }
+        },
+        goAdd() {
+            if (this.type === 'ProductsTransaction') {
+                this.navigateTo('/pagesMine/ProductsTransactionEdit');
+            } else {
+                this.navigateTo('/pagesMine/OrderDetail?type=' + this.type);
+            }
         }
     },
     onReachBottom() {
@@ -149,6 +175,9 @@ export default {
 </script>
 
 <style lang="less">
+.scroll-view {
+    width: 100%;
+}
 .top {
     display: flex;
     height: 44px;
@@ -164,10 +193,12 @@ export default {
         font-weight: 400;
         color: #292c33;
         line-height: 24px;
+        flex-wrap: nowrap;
 
         .tab {
             padding: 0 20px;
             position: relative;
+            white-space: nowrap;
 
             &.active {
                 color: @warn;

+ 1 - 1
src/pagesMine/OrderDetail.vue

@@ -1,6 +1,6 @@
 <config>
 {
-'navigationBarTitleText': '新增需求/成交单',
+'navigationBarTitleText': '',
 }
 </config>
 <template>

+ 197 - 81
src/pagesMine/ProductsTransactionEdit.vue

@@ -1,6 +1,6 @@
 <config>
 {
-'navigationBarTitleText': '新增需求/成交单',
+'navigationBarTitleText': '',
  "usingComponents": {
   "van-datetime-picker": "../native/vant/datetime-picker/index"
 }
@@ -20,10 +20,10 @@
             <div class="page-input">
                 <input
                     type="text"
-                    @input="form.name = $event.detail.value"
-                    @confirm="form.name = $event.detail.value"
-                    @blur="form.name = $event.detail.value"
-                    :value="form.name"
+                    @input="form.chName = $event.detail.value"
+                    @confirm="form.chName = $event.detail.value"
+                    @blur="form.chName = $event.detail.value"
+                    :value="form.chName"
                     class="text"
                     :placeholder="$t('qing-shu-ru-chan-pin-ming-cheng')"
                     placeholder-class="pla-textarea"
@@ -65,17 +65,14 @@
 
         <div class="page-info">
             <h3>{{ $t('chan-pin-lei-bie') }}</h3>
-            <div class="page-input">
-                <input
-                    type="text"
-                    @input="form.customCategory = $event.detail.value"
-                    @confirm="form.customCategory = $event.detail.value"
-                    @blur="form.customCategory = $event.detail.value"
-                    :value="form.customCategory"
-                    class="text"
-                    :placeholder="$t('qing-shu-ru-chan-pin-lei-bie')"
-                    placeholder-class="pla-textarea"
-                />
+            <div class="page-input" @click="$refs.productCategory.show()">
+                <div class="text">
+                    <product-category-select
+                        ref="productCategory"
+                        v-model="form.productCategoryId"
+                    ></product-category-select>
+                </div>
+                <van-icon name="arrow" color="#CCD0DC" :size="24" />
             </div>
         </div>
 
@@ -104,10 +101,6 @@
             />
         </div>
 
-        <div class="del-btn" v-if="orderId">
-            <van-button block plain size="small" :color="$colors.info" @click="del">删除</van-button>
-        </div>
-
         <div class="page-info">
             <h3>{{ $t('jiao-yi-gong-si') }}</h3>
             <div class="page-input">
@@ -124,6 +117,109 @@
             </div>
         </div>
 
+        <div class="page-info">
+            <h3>{{ $t('jiao-yi-shi-jian') }}</h3>
+            <div class="page-input" @click="selectTime">
+                <span class="text" v-if="form.transactionTime">{{ form.transactionTime }}</span>
+                <span class="pla-textarea flex1" v-else>{{ $t('qing-xuan-ze-jiao-yi-shi-jian') }}</span>
+                <van-icon name="arrow" color="#CCD0DC" :size="24" />
+            </div>
+        </div>
+
+        <div class="page-info">
+            <h3>{{ $t('jiao-yi-jia-ge') }}</h3>
+            <div class="page-input">
+                <span class="pre">$</span>
+                <input
+                    type="digit"
+                    @input="form.price = $event.detail.value"
+                    @confirm="changePrice"
+                    @blur="changePrice"
+                    :value="form.price"
+                    class="text"
+                    placeholder="0.00"
+                    placeholder-class="pla-textarea"
+                />
+            </div>
+        </div>
+
+        <div class="page-info" v-if="orderId">
+            <h3>{{ $t('bian-hao') }}</h3>
+            <div class="page-input">
+                <span class="text">{{ form.number }}</span>
+            </div>
+        </div>
+
+        <div class="page-info">
+            <h3>{{ $t('hai-guan-bian-ma') }}</h3>
+            <div class="page-input">
+                <input
+                    type="number"
+                    @input="form.customsHsCode = $event.detail.value"
+                    @confirm="form.customsHsCode = $event.detail.value"
+                    @blur="form.customsHsCode = $event.detail.value"
+                    :value="form.customsHsCode"
+                    class="text"
+                    placeholder-class="pla-textarea"
+                    :placeholder="$t('qing-shu-ru-10-wei-hai-guan-bian-ma')"
+                    :maxlength="10"
+                />
+            </div>
+        </div>
+        <div class="page-info">
+            <h3>{{ $t('jin-jing-bei-an-dan-hao') }}</h3>
+            <div class="page-input">
+                <input
+                    type="number"
+                    @input="form.entryRecordNumber = $event.detail.value"
+                    @confirm="form.entryRecordNumber = $event.detail.value"
+                    @blur="form.entryRecordNumber = $event.detail.value"
+                    :value="form.entryRecordNumber"
+                    class="text"
+                    placeholder-class="pla-textarea"
+                    :placeholder="$t('qing-shu-ru-18-wei-bian-hao')"
+                    :maxlength="18"
+                />
+            </div>
+        </div>
+        <div class="page-info">
+            <h3>{{ $t('jin-kou-bao-guan-dan-hao') }}</h3>
+            <div class="page-input">
+                <input
+                    type="number"
+                    @input="form.importDeclarationNumber = $event.detail.value"
+                    @confirm="form.importDeclarationNumber = $event.detail.value"
+                    @blur="form.importDeclarationNumber = $event.detail.value"
+                    :value="form.importDeclarationNumber"
+                    class="text"
+                    placeholder-class="pla-textarea"
+                    :placeholder="$t('qing-shu-ru-18-wei-bian-hao')"
+                    :maxlength="18"
+                />
+            </div>
+        </div>
+
+        <div class="page-info">
+            <h3>{{ $t('chu-jing-bei-an-dan-hao') }}</h3>
+            <div class="page-input">
+                <input
+                    type="number"
+                    @input="form.exitRecordNumber = $event.detail.value"
+                    @confirm="form.exitRecordNumber = $event.detail.value"
+                    @blur="form.exitRecordNumber = $event.detail.value"
+                    :value="form.exitRecordNumber"
+                    class="text"
+                    placeholder-class="pla-textarea"
+                    :placeholder="$t('qing-shu-ru-18-wei-bian-hao')"
+                    :maxlength="18"
+                />
+            </div>
+        </div>
+
+        <div class="del-btn" v-if="orderId">
+            <van-button block plain size="small" :color="$colors.info" @click="del">删除</van-button>
+        </div>
+
         <fixed-button>
             <van-button block @click="submit" :color="$colors.warn" :disabled="!canNext">{{
                 orderId ? $t('bao-cun') : $t('ti-jiao')
@@ -135,7 +231,7 @@
             <div class="bar">
                 <van-icon color="#5E636D" :size="24" name="cross" @click="showTime = false" />
                 <h3></h3>
-                <van-button :color="$colors.warn" plain @click="changeTime">{{ $t('que-ding') }}</van-button>
+                <van-button :color="$colors.warn" plain @click="sureTime">{{ $t('que-ding') }}</van-button>
             </div>
             <van-datetime-picker :show-toolbar="false" type="datetime" :value="nowTime" @input="changeTime" />
         </van-popup>
@@ -152,17 +248,15 @@ export default {
         return {
             orderId: 0,
             form: {
-                type: 'OWN_PRODUCT',
-                name: '',
+                chName: '',
                 brand: '',
                 model: '',
-                customCategory: '',
-                productCategoryId: '',
                 applicationField: [],
-                introduction: ''
+                introduction: '',
+                price: ''
             },
             isVendor: false,
-            showTime: true,
+            showTime: false,
             nowTime: ''
         };
     },
@@ -176,12 +270,17 @@ export default {
         },
         canNext() {
             if (
-                this.form.type &&
-                this.form.name &&
+                this.form.chName &&
                 this.form.brand &&
-                this.form.productCategoryId &&
                 this.form.introduction &&
-                this.form.applicationField.length > 0
+                this.form.applicationField.length > 0 &&
+                this.form.exitRecordNumber &&
+                this.form.importDeclarationNumber &&
+                this.form.entryRecordNumber &&
+                this.form.customsHsCode &&
+                this.form.price &&
+                this.form.transactionTime &&
+                this.form.transactionCompany
             ) {
                 return true;
             } else {
@@ -190,15 +289,13 @@ export default {
         }
     },
     onLoad(options) {
-        if (this.$store.state.userInfo && this.$store.state.userInfo.identity !== 'BUYERS') {
-            this.isVendor = true;
-        } else {
-            this.isVendor = false;
-        }
+        wx.setNavigationBarTitle({
+            title: this.$t('xin-zeng-xu-qiu-cheng-jiao-dan')
+        });
         if (options.id) {
             this.orderId = options.id;
             this.$http
-                .get('/productList/get/' + options.id)
+                .get('/productsTransaction/get/' + options.id)
                 .then(res => {
                     delete res.productCategory;
                     this.form = res;
@@ -208,41 +305,11 @@ export default {
                     this.loading = false;
                 });
         }
-
-        if (options.type) {
-            this.form.type = options.type;
-        }
     },
     methods: {
-        chooseType() {
-            if (this.form.id) {
-                return;
-            }
-            const types = [...productListType].filter(item => {
-                if (this.isVendor && item[0] === 'OWN_PRODUCT') {
-                    return false;
-                } else {
-                    return true;
-                }
-            });
-            const _list = [...types].map(item => {
-                console.log(item);
-
-                return this.$t(item[1]);
-            });
-            wx.showActionSheet({
-                itemList: _list,
-                success: res => {
-                    this.form.type = [...types][res.tapIndex][0];
-                },
-                fail: res => {
-                    console.log(res.errMsg);
-                }
-            });
-        },
         submit() {
             const form = { ...this.form };
-            if (!form.name) {
+            if (!form.chName) {
                 this.toast(this.$t('qing-shu-ru-chan-pin-ming-cheng'));
                 return;
             }
@@ -250,14 +317,7 @@ export default {
                 this.toast(this.$t('qing-shu-ru-pin-pai-ming-cheng'));
                 return;
             }
-            if (this.form.type === 'OWN_PRODUCT' && !form.customCategory) {
-                this.toast(this.$t('qing-shu-ru-chan-pin-lei-bie'));
-                return;
-            }
-            if (this.form.type !== 'OWN_PRODUCT' && !form.productCategoryId) {
-                this.toast(this.$t('qing-xuan-ze-chan-pin-lei-bie'));
-                return;
-            }
+
             if (form.applicationField.length === 0) {
                 this.toast(this.$t('qing-xuan-ze-ying-yong-ling-yu'));
                 return;
@@ -266,11 +326,48 @@ export default {
                 this.toast(this.$t('qing-shu-ru-chan-pin-miao-shu'));
                 return;
             }
+
+            if (!form.transactionCompany) {
+                this.toast(this.$t('qing-shu-ru-jiao-yi-gong-si'));
+                return;
+            }
+
+            if (!form.transactionTime) {
+                this.toast(this.$t('qing-xuan-ze-jiao-yi-shi-jian'));
+                return;
+            }
+
+            if (!form.price) {
+                this.toast(this.$t('qing-shu-ru-huo-zhi'));
+                return;
+            }
+
+            if (!form.customsHsCode || !/[0-9]{10}/g.test(form.customsHsCode)) {
+                this.toast(this.$t('hai-guan-bian-ma-ge-shi-cuo-wu'));
+                return;
+            }
+
+            if (!form.entryRecordNumber || !/[0-9]{18}/g.test(form.entryRecordNumber)) {
+                this.toast(this.$t('qing-shu-ru-18-wei-shu-zi-chu-jing-bei-an-dan-hao'));
+                return;
+            }
+
+            if (!form.importDeclarationNumber || !/[0-9]{18}/g.test(form.importDeclarationNumber)) {
+                this.toast(this.$t('qing-shu-ru-18-wei-shu-zi-jin-kou-bao-guan-dan-hao'));
+                return;
+            }
+
+            if (!form.exitRecordNumber || !/[0-9]{18}/g.test(form.exitRecordNumber)) {
+                this.toast(this.$t('qing-shu-ru-18-wei-shu-zi-chu-jing-bei-an-dan-hao'));
+                return;
+            }
+
             if (!form.id) {
                 form.userId = this.$store.state.userInfo.id;
             }
+
             this.$http
-                .post('/productList/save', form, {
+                .post('/productsTransaction/save', form, {
                     header: {
                         'Content-Type': 'application/json'
                     }
@@ -291,7 +388,7 @@ export default {
         del() {
             this.dialog(this.$t('que-ren-yao-shan-chu-gai-qing-dan-ma'), true, false, this.$t('li-ji-shan-chu'))
                 .then(() => {
-                    return this.$http.post(`/productList/del/${this.orderId}`);
+                    return this.$http.post(`/productsTransaction/del/${this.orderId}`);
                 })
                 .then(() => {
                     this.toast(this.$t('shan-chu-cheng-gong'), 'success');
@@ -306,13 +403,27 @@ export default {
                 });
         },
         changeTime(e) {
-            console.log(e);
-            this.nowTime = new Date(e.detail);
+            this.nowTime = e.detail;
+        },
+        changePrice(e) {
+            console.log(e.detail);
+            this.form.price = Number(e.detail.value);
+        },
+        sureTime() {
+            this.form.transactionTime = dayjs(new Date(this.nowTime)).format('YYYY-MM-DD HH:mm:ss');
+            this.showTime = false;
+        },
+        selectTime() {
+            this.showTime = true;
+            this.$nextTick(() => {
+                this.nowTime = new Date().getTime();
+            });
         }
     },
     components: {
         ApplicationSelect,
-        FixedButton
+        FixedButton,
+        ProductCategorySelect
     }
 };
 </script>
@@ -339,6 +450,11 @@ export default {
             line-height: 22px;
             overflow: hidden;
         }
+
+        .pre {
+            font-size: 14px;
+            padding-right: 5px;
+        }
     }
 
     .pla-textarea {