achao преди 3 години
родител
ревизия
7cec8cb923

+ 5 - 5
unimall-admin/config/dep.env.js

@@ -1,6 +1,6 @@
 module.exports = {
-	NODE_ENV: '"production"',
-  ENV_CONFIG: '"dep"',
-  HOST: '"http://192.168.1.113:8080"',
-  BASE_API: '"http://192.168.1.113:8080/m.api"'
-}
+    NODE_ENV: '"production"',
+    ENV_CONFIG: '"dep"',
+    HOST: '"http://192.168.110.82:8080"',
+    BASE_API: '"http://192.168.110.82:8080/m.api"'
+}

+ 10 - 10
unimall-admin/config/dev.env.js

@@ -1,12 +1,12 @@
 module.exports = {
-	NODE_ENV: '"development"',
-  ENV_CONFIG: '"dev"',
+    NODE_ENV: '"development"',
+    ENV_CONFIG: '"dev"',
 
-  HOST: '"http://192.168.1.113:8080"',
-  BASE_API: '"http://192.168.1.113:8080/m.api"'
-  // HOST: '"http://192.168.1.115:8080"',
-  // BASE_API: '"http://192.168.1.115:8080/m.api"'
-  // HOST: '"http://192.168.1.113:8080"',
-  
-  // BASE_API: '"http://192.168.1.113:8080/m.api"'
-}
+    HOST: '"http://192.168.110.82:8080"',
+    BASE_API: '"http://192.168.110.82:8080/m.api"'
+        // HOST: '"http://192.168.1.115:8080"',
+        // BASE_API: '"http://192.168.1.115:8080/m.api"'
+        // HOST: '"http://192.168.1.113:8080"',
+
+    // BASE_API: '"http://192.168.1.113:8080/m.api"'
+}

+ 68 - 68
unimall-admin/config/index.js

@@ -5,84 +5,84 @@
 const path = require('path')
 
 module.exports = {
-  dev: {
-    // Paths
-    assetsSubDirectory: 'static',
-    assetsPublicPath: '/',
-    proxyTable: {},
+    dev: {
+        // Paths
+        assetsSubDirectory: 'static',
+        assetsPublicPath: '/',
+        proxyTable: {},
 
-    // Various Dev Server settings
+        // Various Dev Server settings
 
-    // can be overwritten by process.env.HOST
-    // if you want dev by ip, please set host: '0.0.0.0'
-    host: 'localhost',
-    port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
-    autoOpenBrowser: true,
-    errorOverlay: true,
-    notifyOnErrors: false,
-    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
+        // can be overwritten by process.env.HOST
+        // if you want dev by ip, please set host: '0.0.0.0'
+        host: '192.168.110.175',
+        port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+        autoOpenBrowser: true,
+        errorOverlay: true,
+        notifyOnErrors: false,
+        poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
 
-    // Use Eslint Loader?
-    // If true, your code will be linted during bundling and
-    // linting errors and warnings will be shown in the console.
-    useEslint: true,
-    // If true, eslint errors and warnings will also be shown in the error overlay
-    // in the browser.
-    showEslintErrorsInOverlay: false,
+        // Use Eslint Loader?
+        // If true, your code will be linted during bundling and
+        // linting errors and warnings will be shown in the console.
+        useEslint: true,
+        // If true, eslint errors and warnings will also be shown in the error overlay
+        // in the browser.
+        showEslintErrorsInOverlay: false,
 
-    /**
-     * Source Maps
-     */
+        /**
+         * Source Maps
+         */
 
-    // https://webpack.js.org/configuration/devtool/#development
-    devtool: 'cheap-source-map',
+        // https://webpack.js.org/configuration/devtool/#development
+        devtool: 'cheap-source-map',
 
-    // CSS Sourcemaps off by default because relative paths are "buggy"
-    // with this option, according to the CSS-Loader README
-    // (https://github.com/webpack/css-loader#sourcemaps)
-    // In our experience, they generally work as expected,
-    // just be aware of this issue when enabling this option.
-    cssSourceMap: false
-  },
+        // CSS Sourcemaps off by default because relative paths are "buggy"
+        // with this option, according to the CSS-Loader README
+        // (https://github.com/webpack/css-loader#sourcemaps)
+        // In our experience, they generally work as expected,
+        // just be aware of this issue when enabling this option.
+        cssSourceMap: false
+    },
 
-  build: {
-    // Template for index.html
-    index: path.resolve(__dirname, '../dist/index.html'),
+    build: {
+        // Template for index.html
+        index: path.resolve(__dirname, '../dist/index.html'),
 
-    // Paths
-    assetsRoot: path.resolve(__dirname, '../dist'),
-    assetsSubDirectory: 'static',
+        // Paths
+        assetsRoot: path.resolve(__dirname, '../dist'),
+        assetsSubDirectory: 'static',
 
-    /**
-     * You can set by youself according to actual condition
-     * You will need to set this if you plan to deploy your site under a sub path,
-     * for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
-     * then assetsPublicPath should be set to "/bar/".
-     * In most cases please use '/' !!!
-     */
-    assetsPublicPath: '/',
+        /**
+         * You can set by youself according to actual condition
+         * You will need to set this if you plan to deploy your site under a sub path,
+         * for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
+         * then assetsPublicPath should be set to "/bar/".
+         * In most cases please use '/' !!!
+         */
+        assetsPublicPath: '/',
 
-    /**
-     * Source Maps
-     */
-    productionSourceMap: false,
-    // https://webpack.js.org/configuration/devtool/#production
-    devtool: 'source-map',
+        /**
+         * Source Maps
+         */
+        productionSourceMap: false,
+        // https://webpack.js.org/configuration/devtool/#production
+        devtool: 'source-map',
 
-    // Gzip off by default as many popular static hosts such as
-    // Surge or Netlify already gzip all static assets for you.
-    // Before setting to `true`, make sure to:
-    // npm install --save-dev compression-webpack-plugin
-    productionGzip: false,
-    productionGzipExtensions: ['js', 'css'],
+        // Gzip off by default as many popular static hosts such as
+        // Surge or Netlify already gzip all static assets for you.
+        // Before setting to `true`, make sure to:
+        // npm install --save-dev compression-webpack-plugin
+        productionGzip: false,
+        productionGzipExtensions: ['js', 'css'],
 
-    // Run the build command with an extra argument to
-    // View the bundle analyzer report after build finishes:
-    // `npm run build:prod --report`
-    // Set to `true` or `false` to always turn it on or off
-    bundleAnalyzerReport: process.env.npm_config_report || false,
+        // Run the build command with an extra argument to
+        // View the bundle analyzer report after build finishes:
+        // `npm run build:prod --report`
+        // Set to `true` or `false` to always turn it on or off
+        bundleAnalyzerReport: process.env.npm_config_report || false,
 
-    // `npm run build:prod --generate_report`
-    generateAnalyzerReport: process.env.npm_config_generate_report || false
-  }
-}
+        // `npm run build:prod --generate_report`
+        generateAnalyzerReport: process.env.npm_config_generate_report || false
+    }
+}

+ 26 - 3
unimall-admin/src/api/expressBill.js

@@ -4,12 +4,12 @@ import Qs from 'qs'
 export function listExpressBill(query) {
   return request({
     method: 'post',
-    params:{
+    params: {
       _gp: 'admin.expressbill',
       _mt: 'list',
       page: query.page,
       limit: query.limit,
-      ...query
+      ExpressBillDTO: JSON.stringify(query.type)
     }
   })
 }
@@ -31,7 +31,7 @@ export function updateExpressBill(data) {
     data: Qs.stringify({
       _gp: 'admin.expressbill',
       _mt: 'edit',
-      ExpressBillDTO: JSON.stringify(data)
+      expressBillDTOS: JSON.stringify(data)
     })
   })
 }
@@ -46,3 +46,26 @@ export function deleteExpressBill(id) {
     }
   })
 }
+
+export function exportXlsx(data) {
+  return request({
+    method: 'post',
+    data: Qs.stringify({
+      _gp: 'admin.expressbill',
+      _mt: 'export',
+      ExpressBillDTO: JSON.stringify(data),
+      response: 'blob'
+    })
+  })
+}
+
+export function importWord(data) {
+  return request({
+    method: 'post',
+    data: Qs.stringify({
+      _gp: 'admin.expressbill',
+      _mt: 'createAll',
+      ExpressBillDTO: JSON.stringify(data)
+    })
+  })
+}

+ 2 - 2
unimall-admin/src/api/foreignExchange.js

@@ -4,12 +4,12 @@ import Qs from 'qs'
 export function listForeignExchange(query) {
   return request({
     method: 'post',
-    params:{
+    params: {
       _gp: 'admin.foreignexchange',
       _mt: 'list',
       page: query.page,
       limit: query.limit,
-      ...query
+      ForeignExchangeDTO: JSON.stringify(query.type)
     }
   })
 }

+ 101 - 80
unimall-admin/src/router/route.json

@@ -1,82 +1,103 @@
-[
-	{
-		"redirect":"noredirect",
-		"path":"/tools1",
-		"children":[
-			{
-				"path":"generator",
-				"meta":{
-					"noCache":true,
-					"perms":[
-						""
-					],
-					"title":"代码生成器"
-				},
-				"name":"tools",
-				"page":"/tools/generator"
-			}
-		],
-		"meta":{
-			"icon":"tools",
-			"title":"实用工具"
-		},
-		"name":"toolsManage",
-		"alwaysShow":true
-	},
-	{
+[{
 
-		"redirect":"noredirect",
-		"path":"/tools",
-		"children":[
-			
-			{
-				"path":"expressBusiness",
-				"meta":{
-					"noCache":true,
-					"perms":[
-						""
-					],
-					"title":"快递业务"
-				},
-				"name":"expressBusiness",
-				"page":"/express/expressBusiness"
-			},
-			{
-				"path":"settlement",
-				"meta":{
-					"noCache":true,
-					"perms":[
-						""
-					],
-					"title":"商品结算"
-				},
-				"name":"settlement",
-				"page":"/settlement/settlementManagement"
-			},{
-				"path":"stock",
-				"meta":{
-					"noCache":true,
-					"perms":[
-						""
-					],
-					"title":"库存管理"
-				},
-				"name":"stock",
-				"page":"/stock/stockManagement"
-			}
-		
-		],
-		"meta":{
-			"icon":"tools",
-			"title":"商铺业务管理"
-		},
-		"name":"toolsManage",
-		"alwaysShow":true
-	},
-	{
-		"redirect":"/404",
-		"path":"*",
-		"hidden":true
-	}
+        "redirect": "noredirect",
+        "path": "/tools",
+        "children": [
 
-]
+            {
+                "path": "expressBusiness",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "快递业务"
+                },
+                "name": "expressBusiness",
+                "page": "/express/expressBusiness"
+            },
+            {
+                "path": "settlement",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "商品结算"
+                },
+                "name": "settlement",
+                "page": "/settlement/settlementManagement"
+            }, {
+                "path": "stock",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "库存管理"
+                },
+                "name": "stock",
+                "page": "/stock/stockManagement"
+            },
+            {
+                "path": "expressBill",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "快递管理"
+                },
+                "name": "expressBill",
+                "page": "/expressBill/expressBill"
+            }, {
+                "path": "foreignExchange",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "外汇管理"
+                },
+                "name": "stock",
+                "page": "/foreignExchange/foreignExchange"
+            }, {
+                "path": "productSales",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "产品销售"
+                },
+                "name": "productSales",
+                "page": "/productSales/productSales"
+            }, {
+                "path": "maritimeAdministration",
+                "meta": {
+                    "noCache": true,
+                    "perms": [
+                        ""
+                    ],
+                    "title": "海运业务"
+                },
+                "name": "maritimeAdministration",
+                "page": "/maritimeAdministration/MaritimeAdministration"
+            }
+
+
+        ],
+        "meta": {
+            "icon": "tools",
+            "title": "商铺业务管理"
+        },
+        "name": "toolsManage",
+        "alwaysShow": true
+    },
+    {
+        "redirect": "/404",
+        "path": "*",
+        "hidden": true
+    }
+
+]

+ 1 - 0
unimall-admin/src/views/collectionPayment/collectionPayment.vue

@@ -18,6 +18,7 @@
         v-model="listQuery.type.receivingWithdrawingRegion"
         placeholder="请选择收款地"
         style="margin:0 20px;"
+        clearable
         size="small">
         <el-option v-for="(item, index) in placeList" :label="item.country" :value="item.country" :key="index"/>
       </el-select>

+ 581 - 199
unimall-admin/src/views/expressBill/expressBill.vue

@@ -1,213 +1,595 @@
 <template>
-    <div class="app-container">
-        <!-- 查询和其他操作 -->
-        <div class="filter-container">
-                        <el-button v-permission="['expressBill:expressbill:list']" class="filter-item" type="primary" size="mini" icon="el-icon-search" @click="handleFilter">查找</el-button>
-            <el-button v-permission="['expressBill:expressbill:create']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleCreate">添加</el-button>
-        </div>
-
-        <!-- 查询结果 -->
-        <el-table
-                v-loading="listLoading"
-                :data="list"
-                size="small"
-                element-loading-text="正在查询中。。。"
-                border
-                fit
-                highlight-current-row
-        >
-            <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <el-button v-permission="['expressBill:expressbill:edit']" type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
-                    <el-button v-permission="['expressBill:expressbill:delete']" type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-
-        <pagination
-                v-show="total>0"
-                :total="total"
-                :page.sync="listQuery.page"
-                :limit.sync="listQuery.limit"
-                @pagination="getList"
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input
+        v-model="listQuery.type.customer"
+        clearable
+        class="filter-item"
+        size="small"
+        style="width: 200px;"
+        placeholder="请输入客户名称"
+      />
+      <el-select
+        v-model="listQuery.type.courierAervices"
+        placeholder="请选择快递种类"
+        style="margin:0 20px;"
+        clearable
+        size="small"
+      >
+        <el-option
+          v-for="(item, index) in kdList"
+          :label="item.type"
+          :value="item.type"
+          :key="index"
         />
+      </el-select>
+      <el-button
+        v-permission="['expressBill:expressbill:list']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-search"
+        @click="handleFilter"
+      >查找</el-button>
+      <el-button
+        v-permission="['expressBill:expressbill:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleCreate"
+      >添加</el-button>
+      <el-button
+        v-permission="['expressBill:expressbill:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="exportlist"
+      >导出</el-button>
 
-        <!-- 添加或修改对话框 -->
-        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
-            <el-form
-                    ref="dataForm"
-                    :rules="rules"
-                    :model="dataForm"
-                    status-icon
-                    label-position="left"
-                    label-width="100px"
-                    style="width: 400px; margin-left:50px;"
-            >
-                <el-form-item label="id" prop="id" hidden>
-                    <el-input v-model="dataForm.id" />
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取消</el-button>
-                <el-button v-if="dialogStatus=='create'" :loading="submiting" type="primary" @click="createData">确定</el-button>
-                <el-button v-else type="primary" :loading="submiting" @click="updateData">确定</el-button>
-            </div>
-        </el-dialog>
+      <el-upload
+        :on-change="importClick"
+        :show-file-list="false"
+        :auto-upload="false"
+        style="margin-left: 8px;margin-bottom:0"
+        class="filter-item"
+        action=""
+        accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
+        <el-button
+          class="filter-item"
+          type="primary"
+          size="mini"
+          icon="el-icon-edit">导入</el-button>
+      </el-upload>
     </div>
+
+    <!-- 查询结果 -->
+    <el-table
+      v-loading="listLoading"
+      :data="list"
+      :summary-method="getSummaries"
+      size="small"
+      element-loading-text="正在查询中。。。"
+      border
+      fit
+      highlight-current-row
+      show-summary
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column :selectable="selectInit" type="selection" />
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="客户编号" prop="customerNo" />
+      <el-table-column align="center" label="客户名称" prop="customer" />
+      <el-table-column align="center" label="快递种类" prop="courierAervices" />
+      <el-table-column align="center" label="产品" prop="goods" />
+      <el-table-column align="center" label="重量" prop="weight" />
+      <el-table-column align="center" label="单价" prop="price" />
+      <el-table-column align="center" label="总价" prop="amount" />
+      <el-table-column align="center" label="支付方式" prop="payType" />
+      <el-table-column align="center" label="备注" prop="remarks" />
+      <el-table-column align="center" label="操作" class-name="small-padding">
+        <template slot-scope="scope">
+          <el-button
+            v-permission="['expressBill:expressbill:edit']"
+            type="primary"
+            size="mini"
+            @click="handleUpdate(scope.row)"
+          >编辑</el-button>
+          <el-button
+            v-permission="['expressBill:expressbill:delete']"
+            type="danger"
+            size="mini"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <el-pagination
+      :current-page="currentPage"
+      :page-sizes="[100, 200, 300, 400,1000,1500,2000]"
+      :page-size="100"
+      :total="total"
+      layout="total, sizes, prev, pager, next, jumper"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"/>
+
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
+      <el-form
+        ref="dataForm"
+        :rules="rules"
+        :model="dataForm"
+        status-icon
+        label-position="left"
+        label-width="100px"
+        style="width: 400px; margin-left:50px;"
+      >
+        <el-form-item label="id" prop="id" hidden>
+          <el-input v-model="dataForm.id" />
+        </el-form-item>
+        <el-form-item label="客户编号" prop="customerNo">
+          <el-input v-model="dataForm.customerNo" />
+        </el-form-item>
+        <el-form-item label="客户名称" prop="customer">
+          <el-input v-model="dataForm.customer" />
+        </el-form-item>
+        <el-form-item label="快递种类" prop="courierAervices">
+          <!-- <el-input v-model="dataForm.courierAervices" /> -->
+          <el-select v-model="dataForm.courierAervices" placeholder="请选择快递种类" style="width:100%">
+            <el-option
+              v-for="(item, index) in kdList"
+              :label="item.type"
+              :value="item.type"
+              :key="index"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="产品" prop="goods">
+          <el-input v-model="dataForm.goods" />
+        </el-form-item>
+        <el-form-item label="重量" prop="weight">
+          <el-input v-model="dataForm.weight" />
+        </el-form-item>
+        <el-form-item label="单价" prop="price">
+          <el-input v-model="dataForm.price" />
+        </el-form-item>
+        <el-form-item label="总价" prop="amount">
+          <el-input v-model="dataForm.amount" />
+        </el-form-item>
+        <el-form-item label="支付方式" prop="payType">
+          <!-- <el-input v-model="dataForm.payType" /> -->
+          <el-select v-model="dataForm.payType" placeholder="请选择支付方式" style="width:100%">
+            <el-option
+              v-for="(item, index) in payList"
+              :label="item.type"
+              :value="item.type"
+              :key="index"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="dataForm.remarks" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button
+          v-if="dialogStatus=='create'"
+          :loading="submiting"
+          type="primary"
+          @click="createData"
+        >确定</el-button>
+        <el-button v-else :loading="submiting" type="primary" @click="updateData">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import {
-        listExpressBill,
-        createExpressBill,
-        updateExpressBill,
-        deleteExpressBill
-    } from '@/api/expressBill'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: 'ExpressBill',
-        components: { Pagination },
-        data() {
-            return {
-                list: null,
-                total: 0,
-                listLoading: true,
-                listQuery: {
-                    page: 1,
-                    limit: 20
-                },
-                dataForm: {
-                    id: undefined
-                },
-                dialogFormVisible: false,
-                submiting: false,
-                dialogStatus: '',
-                textMap: {
-                    update: '编辑',
-                    create: '创建'
-                },
-                rules: {
-                }
-            }
+import {
+  listExpressBill,
+  createExpressBill,
+  updateExpressBill,
+  deleteExpressBill,
+  exportXlsx,
+  importWord
+} from '@/api/expressBill'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'ExpressBill',
+  components: { Pagination },
+  data() {
+    return {
+      excelFreightspace: [],
+      modification: [],
+      kdList1: [],
+      kdList: [
+        {
+          type: 'UPS'
         },
-        created() {
-            this.getList()
+        {
+          type: 'DHL'
         },
-        methods: {
-            getList() {
-                this.listLoading = true
-                listExpressBill(this.listQuery).then(response => {
-                    this.list = response.data.data.items
-                    this.total = response.data.data.total
-                    this.listLoading = false
-                })
-                .catch(() => {
-                    this.list = []
-                    this.total = 0
-                    this.listLoading = false
+        {
+          type: 'TNT'
+        },
+        {
+          type: '直达'
+        }
+      ],
+      payList1: [],
+      payList: [
+        {
+          type: '现金'
+        },
+        {
+          type: '微信'
+        },
+        {
+          type: '银行转账'
+        }
+      ],
+      list: null,
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        limit: 100,
+        type: {
+          customer: '',
+          courierAervices: ''
+        }
+      },
+      dataForm: {
+        id: undefined
+      },
+      dialogFormVisible: false,
+      submiting: false,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '创建'
+      },
+      rules: {}
+    }
+  },
+  created() {
+    this.getList()
+    this.currentPage = 1
+  },
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.listQuery.limit = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.listQuery.page = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        } else if (index == 8) {
+          const values = data.map((item) => Number(item[column.property]))
+          if (!values.every((value) => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+            sums[index] += ''
+          } else {
+            sums[index] = '--'
+          }
+        } else {
+          // sums[index] = "--";
+        }
+      })
+
+      return sums
+    },
+    importClick(file, fileList) {
+      this.fileTemp = file.raw
+      const fileName = file.raw.name
+      const fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
+      // 判断上传文件格式
+      if (this.fileTemp) {
+        if (fileType == 'xlsx' || fileType == 'xls') {
+          this.importf(this.fileTemp)
+        } else {
+          this.$message({
+            type: 'warning',
+            message: '附件格式错误,请删除后重新上传!'
+          })
+        }
+      } else {
+        this.$message({
+          type: 'warning',
+          message: '请上传附件!'
+        })
+      }
+    },
+    importf(obj) {
+      this.excelFreightspace = []
+      // this.dialogVisible = true;
+      const _this = this
+      const inputDOM = this.$refs.inputer // 通过DOM取文件数据
+      this.file = event.currentTarget.files[0]
+      var rABS = false // 是否将文件读取为二进制字符串
+      var f = this.file
+      var reader = new FileReader()
+      // if (!FileReader.prototype.readAsBinaryString) {
+      FileReader.prototype.readAsBinaryString = function(f) {
+        var binary = ''
+        var rABS = false // 是否将文件读取为二进制字符串
+        var pt = this
+        var wb // 读取完成的数据
+        var outdata
+        var reader = new FileReader()
+        reader.onload = function(e) {
+          var bytes = new Uint8Array(reader.result)
+          var length = bytes.byteLength
+          for (var i = 0; i < length; i++) {
+            binary += String.fromCharCode(bytes[i])
+          }
+          var XLSX = require('xlsx')
+          if (rABS) {
+            wb = XLSX.read(btoa(fixdata(binary)), {
+              // 手动转化
+              type: 'base64',
+              cellDates: true
+            })
+          } else {
+            wb = XLSX.read(binary, {
+              type: 'binary'
+            })
+          }
+          // outdata就是你想要的东西 excel导入的数据
+          outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]])
+          // excel 数据再处理
+          const arr = []
+          outdata.map(v => {
+            // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
+            const jsonString = JSON.stringify(v)
+              .replace(/\//g, '')
+              .replace(/\s/gi, '')
+            v = JSON.parse(jsonString)
+            const obj = {}
+            // xxx代表列名
+            debugger
+            obj.customerNo = v.客户编号
+            obj.customer = v.客户名称
+            obj.courierAervices = v.快递种类
+            obj.goods = v.产品
+            obj.weight = v.重量
+            obj.price = v.单价
+            obj.amount = v.总价
+            obj.payType = v.支付方式
+            obj.remarks = v.备注
+            for (let i = 0; i < _this.kdList.length; i++) {
+              _this.kdList1.push(_this.kdList[i].type)
+            }
+            for (let i = 0; i < _this.payList.length; i++) {
+              _this.payList1.push(_this.payList[i].type)
+            }
+            if (!_this.payList1.includes(obj.payType)) {
+              _this.isAllowExport = false
+              _this.$notify({
+                title: '失败',
+                message: '导入失败,导入数据中支付方式在系统中不存在,请重新编辑',
+                type: 'error'
+              })
+              return
+            } else {
+              _this.excelFreightspace.push(obj)
+              _this.isAllowExport = true
+            }
+
+            if (!_this.kdList1.includes(obj.courierAervices)) {
+              _this.isAllowExport = false
+              _this.$notify({
+                title: '失败',
+                message: '导入失败,导入数据中快递种类在系统中不存在,请重新编辑',
+                type: 'error'
+              })
+              return
+            } else {
+              _this.excelFreightspace.push(obj)
+              _this.isAllowExport = true
+            }
+          })
+          if (_this.excelFreightspace && _this.isAllowExport) {
+            importWord(_this.excelFreightspace).then(response => {
+              if (response.status == '200') {
+                _this.$notify({
+                  title: '成功',
+                  message: '导入成功',
+                  type: 'success'
                 })
-            },
-            handleFilter() {
-                this.listQuery.page = 1
-                this.getList()
-            },
-            resetForm() {
-                this.dataForm = {
-                    id: undefined
+                _this.getList()
+              }
+            })
+          }
+        }
+        reader.readAsArrayBuffer(f)
+      }
+      if (rABS) {
+        reader.readAsArrayBuffer(f)
+      } else {
+        reader.readAsBinaryString(f)
+      }
+    },
+    handleSelectionChange(val) {
+      this.modification = val
+    },
+    selectInit(row) {
+      return true
+    },
+    async exportlist() {
+      debugger
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择要导出的条目!')
+      } else {
+        console.log('导出数据', this.modification)
+        const _data = {
+          expressBillDTOS: this.modification
+        }
+        const {
+          data
+        } = await exportXlsx(_data).then((response) => { debugger
+          this.download(response.data.data)
+          //   downloadFile({
+          //     res: data,
+          //     fileName: `${
+          //     this.date.year + (this.date.month ? `-${this.date.month}` : '')
+          //     }付款信息`,
+          //     type: 'xls',
+          //     })
+          if (response.status == '200') {
+
+          }
+        })
+      }
+    },
+    getList() {
+      this.listLoading = true
+      listExpressBill(this.listQuery)
+        .then(response => {
+          this.list = response.data.data.items
+          this.total = response.data.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.list = []
+          this.total = 0
+          this.listLoading = false
+        })
+    },
+    handleFilter() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    resetForm() {
+      this.dataForm = {
+        id: undefined
+      }
+    },
+    handleCreate() {
+      this.resetForm()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    createData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          createExpressBill(this.dataForm)
+            .then(response => {
+              this.list.unshift(response.data.data)
+              this.dialogFormVisible = false
+              this.$notify.success({
+                title: '成功',
+                message: '添加成功'
+              })
+              this.submiting = false
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleUpdate(row) {
+      this.dataForm = Object.assign({}, row)
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    updateData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          updateExpressBill(this.dataForm)
+            .then(() => {
+              for (const v of this.list) {
+                if (v.id === this.dataForm.id) {
+                  const index = this.list.indexOf(v)
+                  this.list.splice(index, 1, this.dataForm)
+                  break
                 }
-            },
-            handleCreate() {
-                this.resetForm()
-                this.dialogStatus = 'create'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            createData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        createExpressBill(this.dataForm).then(response => {
-                            this.list.unshift(response.data.data)
-                            this.dialogFormVisible = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '添加成功'
-                            })
-                            this.submiting = false
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleUpdate(row) {
-                this.dataForm = Object.assign({}, row)
-                this.dialogStatus = 'update'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            updateData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        updateExpressBill(this.dataForm).then(() => {
-                            for (const v of this.list) {
-                                if (v.id === this.dataForm.id) {
-                                    const index = this.list.indexOf(v)
-                                    this.list.splice(index, 1, this.dataForm)
-                                    break
-                                }
-                            }
-                            this.dialogFormVisible = false
-                            this.submiting = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '更新成功'
-                            })
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleDelete(row) {
-                this.$confirm('此操作将永久删除该记录---' + row.id + '---, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    deleteExpressBill(row.id).then(response => {
-                        this.$notify.success({
-                            title: '成功',
-                            message: '删除成功'
-                        })
-                        const index = this.list.indexOf(row)
-                        this.list.splice(index, 1)
-                    })
-                    .catch(response => {
-                        this.$notify.error({
-                            title: '失败',
-                            message: response.data.errmsg
-                        })
-                    })
-                }).catch(() => {
-                    return false
-                })
-            }
+              }
+              this.dialogFormVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '更新成功'
+              })
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleDelete(row) {
+      this.$confirm(
+        '此操作将永久删除该记录---' + row.id + '---, 是否继续?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         }
+      )
+        .then(() => {
+          deleteExpressBill(row.id)
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
+              })
+              const index = this.list.indexOf(row)
+              this.list.splice(index, 1)
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+            })
+        })
+        .catch(() => {
+          return false
+        })
     }
+  }
+}
 </script>

+ 292 - 202
unimall-admin/src/views/foreignExchange/foreignExchange.vue

@@ -1,213 +1,303 @@
 <template>
-    <div class="app-container">
-        <!-- 查询和其他操作 -->
-        <div class="filter-container">
-                        <el-button v-permission="['foreignExchange:foreignexchange:list']" class="filter-item" type="primary" size="mini" icon="el-icon-search" @click="handleFilter">查找</el-button>
-            <el-button v-permission="['foreignExchange:foreignexchange:create']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleCreate">添加</el-button>
-        </div>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-input
+        v-model="listQuery.type.customerNo"
+        clearable
+        class="filter-item"
+        size="small"
+        style="width: 200px;"
+        placeholder="请输入客户编号"
+      />
+      <el-button
+        v-permission="['foreignExchange:foreignexchange:list']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-search"
+        @click="handleFilter"
+      >查找</el-button>
+      <el-button
+        v-permission="['foreignExchange:foreignexchange:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleCreate"
+      >添加</el-button>
+    </div>
 
-        <!-- 查询结果 -->
-        <el-table
-                v-loading="listLoading"
-                :data="list"
-                size="small"
-                element-loading-text="正在查询中。。。"
-                border
-                fit
-                highlight-current-row
-        >
-            <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <el-button v-permission="['foreignExchange:foreignexchange:edit']" type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
-                    <el-button v-permission="['foreignExchange:foreignexchange:delete']" type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
+    <!-- 查询结果 -->
+    <el-table
+      v-loading="listLoading"
+      :data="list"
+      size="small"
+      element-loading-text="正在查询中。。。"
+      border
+      fit
+      highlight-current-row
+    >
+      <el-table-column align="center" label="客户编号" prop="customerNo"/>
+      <el-table-column align="center" label="收款日期" prop="collectionDate">
+        <template slot-scope="scope">
+          {{ scope.row.collectionDate }}</template>
+      </el-table-column>
+      <el-table-column align="center" label="汇率" prop="exchange"/>
+      <el-table-column align="center" label="人民币" prop="rmb"/>
+      <el-table-column align="center" label="欧元" prop="euro"/>
+      <el-table-column align="center" label="备注" prop="remark" />
+      <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-permission="['foreignExchange:foreignexchange:edit']"
+            type="primary"
+            size="mini"
+            @click="handleUpdate(scope.row)"
+          >编辑</el-button>
+          <el-button
+            v-permission="['foreignExchange:foreignexchange:delete']"
+            type="danger"
+            size="mini"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
 
-        <pagination
-                v-show="total>0"
-                :total="total"
-                :page.sync="listQuery.page"
-                :limit.sync="listQuery.limit"
-                @pagination="getList"
-        />
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="listQuery.page"
+      :limit.sync="listQuery.limit"
+      @pagination="getList"
+    />
 
-        <!-- 添加或修改对话框 -->
-        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
-            <el-form
-                    ref="dataForm"
-                    :rules="rules"
-                    :model="dataForm"
-                    status-icon
-                    label-position="left"
-                    label-width="100px"
-                    style="width: 400px; margin-left:50px;"
-            >
-                <el-form-item label="id" prop="id" hidden>
-                    <el-input v-model="dataForm.id" />
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取消</el-button>
-                <el-button v-if="dialogStatus=='create'" :loading="submiting" type="primary" @click="createData">确定</el-button>
-                <el-button v-else type="primary" :loading="submiting" @click="updateData">确定</el-button>
-            </div>
-        </el-dialog>
-    </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
+      <el-form
+        ref="dataForm"
+        :rules="rules"
+        :model="dataForm"
+        status-icon
+        label-position="left"
+        label-width="100px"
+        style="width: 400px; margin-left:50px;"
+      >
+        <el-form-item label="id" prop="id" hidden>
+          <el-input v-model="dataForm.id" />
+        </el-form-item>
+        <el-form-item label="客户编号" prop="customerNo">
+          <el-input v-model="dataForm.customerNo" />
+        </el-form-item>
+        <el-form-item label="收款日期" prop="collectionDate">
+          <!-- <el-input v-model="dataForm.receiptPaymentDate" /> -->
+          <el-date-picker
+            v-model="dataForm.collectionDate"
+            type="date"
+            class="tkdate"
+            value-format="yyyy-MM-dd"
+            style="width: 100%;"/>
+        </el-form-item>
+        <el-form-item label="汇率" prop="exchange">
+          <el-input v-model="dataForm.exchange" />
+        </el-form-item>
+        <el-form-item label="人民币" prop="rmb">
+          <el-input v-model="dataForm.rmb" />
+        </el-form-item>
+        <el-form-item label="欧元" prop="euro">
+          <el-input v-model="dataForm.euro" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="dataForm.remark" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button
+          v-if="dialogStatus=='create'"
+          :loading="submiting"
+          type="primary"
+          @click="createData"
+        >确定</el-button>
+        <el-button v-else :loading="submiting" type="primary" @click="updateData">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import {
-        listForeignExchange,
-        createForeignExchange,
-        updateForeignExchange,
-        deleteForeignExchange
-    } from '@/api/foreignExchange'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: 'ForeignExchange',
-        components: { Pagination },
-        data() {
-            return {
-                list: null,
-                total: 0,
-                listLoading: true,
-                listQuery: {
-                    page: 1,
-                    limit: 20
-                },
-                dataForm: {
-                    id: undefined
-                },
-                dialogFormVisible: false,
-                submiting: false,
-                dialogStatus: '',
-                textMap: {
-                    update: '编辑',
-                    create: '创建'
-                },
-                rules: {
-                }
-            }
-        },
-        created() {
-            this.getList()
-        },
-        methods: {
-            getList() {
-                this.listLoading = true
-                listForeignExchange(this.listQuery).then(response => {
-                    this.list = response.data.data.items
-                    this.total = response.data.data.total
-                    this.listLoading = false
-                })
-                .catch(() => {
-                    this.list = []
-                    this.total = 0
-                    this.listLoading = false
-                })
-            },
-            handleFilter() {
-                this.listQuery.page = 1
-                this.getList()
-            },
-            resetForm() {
-                this.dataForm = {
-                    id: undefined
+import {
+  listForeignExchange,
+  createForeignExchange,
+  updateForeignExchange,
+  deleteForeignExchange
+} from '@/api/foreignExchange'
+import Pagination from '@/components/Pagination'
+import {
+  dayjs,
+  EventBus
+} from 'base-core-lib'
+export default {
+  name: 'ForeignExchange',
+  components: { Pagination },
+  data() {
+    return {
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM')
+      },
+      list: null,
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        limit: 20,
+        type: {
+          customerNo: ''
+        }
+      },
+      dataForm: {
+        id: undefined
+      },
+      dialogFormVisible: false,
+      submiting: false,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '创建'
+      },
+      rules: {}
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      this.listLoading = true
+      listForeignExchange(this.listQuery)
+        .then(response => {
+          this.list = response.data.data.items
+          this.total = response.data.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.list = []
+          this.total = 0
+          this.listLoading = false
+        })
+    },
+    handleFilter() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    resetForm() {
+      this.dataForm = {
+        id: undefined
+      }
+    },
+    handleCreate() {
+      this.resetForm()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    createData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          createForeignExchange(this.dataForm)
+            .then(response => {
+              this.list.unshift(response.data.data)
+              this.dialogFormVisible = false
+              this.$notify.success({
+                title: '成功',
+                message: '添加成功'
+              })
+              this.submiting = false
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleUpdate(row) {
+      this.dataForm = Object.assign({}, row)
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    updateData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          updateForeignExchange(this.dataForm)
+            .then(() => {
+              for (const v of this.list) {
+                if (v.id === this.dataForm.id) {
+                  const index = this.list.indexOf(v)
+                  this.list.splice(index, 1, this.dataForm)
+                  break
                 }
-            },
-            handleCreate() {
-                this.resetForm()
-                this.dialogStatus = 'create'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            createData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        createForeignExchange(this.dataForm).then(response => {
-                            this.list.unshift(response.data.data)
-                            this.dialogFormVisible = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '添加成功'
-                            })
-                            this.submiting = false
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleUpdate(row) {
-                this.dataForm = Object.assign({}, row)
-                this.dialogStatus = 'update'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            updateData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        updateForeignExchange(this.dataForm).then(() => {
-                            for (const v of this.list) {
-                                if (v.id === this.dataForm.id) {
-                                    const index = this.list.indexOf(v)
-                                    this.list.splice(index, 1, this.dataForm)
-                                    break
-                                }
-                            }
-                            this.dialogFormVisible = false
-                            this.submiting = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '更新成功'
-                            })
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleDelete(row) {
-                this.$confirm('此操作将永久删除该记录---' + row.id + '---, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    deleteForeignExchange(row.id).then(response => {
-                        this.$notify.success({
-                            title: '成功',
-                            message: '删除成功'
-                        })
-                        const index = this.list.indexOf(row)
-                        this.list.splice(index, 1)
-                    })
-                    .catch(response => {
-                        this.$notify.error({
-                            title: '失败',
-                            message: response.data.errmsg
-                        })
-                    })
-                }).catch(() => {
-                    return false
-                })
-            }
+              }
+              this.dialogFormVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '更新成功'
+              })
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleDelete(row) {
+      this.$confirm(
+        '此操作将永久删除该记录---' + row.id + '---, 是否继续?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         }
+      )
+        .then(() => {
+          deleteForeignExchange(row.id)
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
+              })
+              const index = this.list.indexOf(row)
+              this.list.splice(index, 1)
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+            })
+        })
+        .catch(() => {
+          return false
+        })
     }
+  }
+}
 </script>

+ 265 - 202
unimall-admin/src/views/maritimeAdministration/MaritimeAdministration.vue

@@ -1,213 +1,276 @@
 <template>
-    <div class="app-container">
-        <!-- 查询和其他操作 -->
-        <div class="filter-container">
-                        <el-button v-permission="['maritimeAdministration:maritimeadministration:list']" class="filter-item" type="primary" size="mini" icon="el-icon-search" @click="handleFilter">查找</el-button>
-            <el-button v-permission="['maritimeAdministration:maritimeadministration:create']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleCreate">添加</el-button>
-        </div>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-button
+        v-permission="['maritimeAdministration:maritimeadministration:list']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-search"
+        @click="handleFilter"
+      >查找</el-button>
+      <el-button
+        v-permission="['maritimeAdministration:maritimeadministration:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleCreate"
+      >添加</el-button>
+    </div>
 
-        <!-- 查询结果 -->
-        <el-table
-                v-loading="listLoading"
-                :data="list"
-                size="small"
-                element-loading-text="正在查询中。。。"
-                border
-                fit
-                highlight-current-row
-        >
-            <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <el-button v-permission="['maritimeAdministration:maritimeadministration:edit']" type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
-                    <el-button v-permission="['maritimeAdministration:maritimeadministration:delete']" type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
+    <!-- 查询结果 -->
+    <el-table
+      v-loading="listLoading"
+      :data="list"
+      size="small"
+      element-loading-text="正在查询中。。。"
+      border
+      fit
+      highlight-current-row
+    >
+      <el-table-column align="center" label="集装箱柜号" prop="containerNo" />
+      <el-table-column align="center" label="客户编号" prop="customerNo" />
+      <el-table-column align="center" label="包裹数" prop="count" />
+      <el-table-column align="center" label="人民币" prop="rmb" />
+      <el-table-column align="center" label="欧元 */" prop="euro" />
+      <el-table-column align="center" label="备注" prop="remark" />
 
-        <pagination
-                v-show="total>0"
-                :total="total"
-                :page.sync="listQuery.page"
-                :limit.sync="listQuery.limit"
-                @pagination="getList"
-        />
+      <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-permission="['maritimeAdministration:maritimeadministration:edit']"
+            type="primary"
+            size="mini"
+            @click="handleUpdate(scope.row)"
+          >编辑</el-button>
+          <el-button
+            v-permission="['maritimeAdministration:maritimeadministration:delete']"
+            type="danger"
+            size="mini"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
 
-        <!-- 添加或修改对话框 -->
-        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
-            <el-form
-                    ref="dataForm"
-                    :rules="rules"
-                    :model="dataForm"
-                    status-icon
-                    label-position="left"
-                    label-width="100px"
-                    style="width: 400px; margin-left:50px;"
-            >
-                <el-form-item label="id" prop="id" hidden>
-                    <el-input v-model="dataForm.id" />
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取消</el-button>
-                <el-button v-if="dialogStatus=='create'" :loading="submiting" type="primary" @click="createData">确定</el-button>
-                <el-button v-else type="primary" :loading="submiting" @click="updateData">确定</el-button>
-            </div>
-        </el-dialog>
-    </div>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="listQuery.page"
+      :limit.sync="listQuery.limit"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
+      <el-form
+        ref="dataForm"
+        :rules="rules"
+        :model="dataForm"
+        status-icon
+        label-position="left"
+        label-width="100px"
+        style="width: 400px; margin-left:50px;"
+      >
+        <el-form-item label="id" prop="id" hidden>
+          <el-input v-model="dataForm.id" />
+        </el-form-item>
+        <el-form-item label="集装箱柜号" prop="deductionEuro">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+        <el-form-item label="客户编号" prop="deductionEuro">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+        <el-form-item label="包裹数" prop="deductionEuro">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+        <el-form-item label="人民币" prop="deductionEuro">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+        <el-form-item label="欧元" prop="deductionEuro">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="dataForm.deductionEuro" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button
+          v-if="dialogStatus=='create'"
+          :loading="submiting"
+          type="primary"
+          @click="createData"
+        >确定</el-button>
+        <el-button v-else :loading="submiting" type="primary" @click="updateData">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import {
-        listMaritimeAdministration,
-        createMaritimeAdministration,
-        updateMaritimeAdministration,
-        deleteMaritimeAdministration
-    } from '@/api/MaritimeAdministration'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: 'MaritimeAdministration',
-        components: { Pagination },
-        data() {
-            return {
-                list: null,
-                total: 0,
-                listLoading: true,
-                listQuery: {
-                    page: 1,
-                    limit: 20
-                },
-                dataForm: {
-                    id: undefined
-                },
-                dialogFormVisible: false,
-                submiting: false,
-                dialogStatus: '',
-                textMap: {
-                    update: '编辑',
-                    create: '创建'
-                },
-                rules: {
-                }
-            }
-        },
-        created() {
-            this.getList()
-        },
-        methods: {
-            getList() {
-                this.listLoading = true
-                listMaritimeAdministration(this.listQuery).then(response => {
-                    this.list = response.data.data.items
-                    this.total = response.data.data.total
-                    this.listLoading = false
-                })
-                .catch(() => {
-                    this.list = []
-                    this.total = 0
-                    this.listLoading = false
-                })
-            },
-            handleFilter() {
-                this.listQuery.page = 1
-                this.getList()
-            },
-            resetForm() {
-                this.dataForm = {
-                    id: undefined
+import {
+  listMaritimeAdministration,
+  createMaritimeAdministration,
+  updateMaritimeAdministration,
+  deleteMaritimeAdministration
+} from '@/api/MaritimeAdministration'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'MaritimeAdministration',
+  components: { Pagination },
+  data() {
+    return {
+      list: null,
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        limit: 20
+      },
+      dataForm: {
+        id: undefined
+      },
+      dialogFormVisible: false,
+      submiting: false,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '创建'
+      },
+      rules: {}
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      this.listLoading = true
+      listMaritimeAdministration(this.listQuery)
+        .then(response => {
+          this.list = response.data.data.items
+          this.total = response.data.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.list = []
+          this.total = 0
+          this.listLoading = false
+        })
+    },
+    handleFilter() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    resetForm() {
+      this.dataForm = {
+        id: undefined
+      }
+    },
+    handleCreate() {
+      this.resetForm()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    createData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          createMaritimeAdministration(this.dataForm)
+            .then(response => {
+              this.list.unshift(response.data.data)
+              this.dialogFormVisible = false
+              this.$notify.success({
+                title: '成功',
+                message: '添加成功'
+              })
+              this.submiting = false
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleUpdate(row) {
+      this.dataForm = Object.assign({}, row)
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    updateData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          updateMaritimeAdministration(this.dataForm)
+            .then(() => {
+              for (const v of this.list) {
+                if (v.id === this.dataForm.id) {
+                  const index = this.list.indexOf(v)
+                  this.list.splice(index, 1, this.dataForm)
+                  break
                 }
-            },
-            handleCreate() {
-                this.resetForm()
-                this.dialogStatus = 'create'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            createData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        createMaritimeAdministration(this.dataForm).then(response => {
-                            this.list.unshift(response.data.data)
-                            this.dialogFormVisible = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '添加成功'
-                            })
-                            this.submiting = false
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleUpdate(row) {
-                this.dataForm = Object.assign({}, row)
-                this.dialogStatus = 'update'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            updateData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        updateMaritimeAdministration(this.dataForm).then(() => {
-                            for (const v of this.list) {
-                                if (v.id === this.dataForm.id) {
-                                    const index = this.list.indexOf(v)
-                                    this.list.splice(index, 1, this.dataForm)
-                                    break
-                                }
-                            }
-                            this.dialogFormVisible = false
-                            this.submiting = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '更新成功'
-                            })
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleDelete(row) {
-                this.$confirm('此操作将永久删除该记录---' + row.id + '---, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    deleteMaritimeAdministration(row.id).then(response => {
-                        this.$notify.success({
-                            title: '成功',
-                            message: '删除成功'
-                        })
-                        const index = this.list.indexOf(row)
-                        this.list.splice(index, 1)
-                    })
-                    .catch(response => {
-                        this.$notify.error({
-                            title: '失败',
-                            message: response.data.errmsg
-                        })
-                    })
-                }).catch(() => {
-                    return false
-                })
-            }
+              }
+              this.dialogFormVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '更新成功'
+              })
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleDelete(row) {
+      this.$confirm(
+        '此操作将永久删除该记录---' + row.id + '---, 是否继续?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         }
+      )
+        .then(() => {
+          deleteMaritimeAdministration(row.id)
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
+              })
+              const index = this.list.indexOf(row)
+              this.list.splice(index, 1)
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+            })
+        })
+        .catch(() => {
+          return false
+        })
     }
+  }
+}
 </script>

+ 335 - 202
unimall-admin/src/views/productSales/productSales.vue

@@ -1,213 +1,346 @@
 <template>
-    <div class="app-container">
-        <!-- 查询和其他操作 -->
-        <div class="filter-container">
-                        <el-button v-permission="['productSales:productsales:list']" class="filter-item" type="primary" size="mini" icon="el-icon-search" @click="handleFilter">查找</el-button>
-            <el-button v-permission="['productSales:productsales:create']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleCreate">添加</el-button>
-        </div>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-button
+        v-permission="['productSales:productsales:list']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-search"
+        @click="handleFilter"
+      >查找</el-button>
+      <el-button
+        v-permission="['productSales:productsales:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleCreate"
+      >添加</el-button>
+    </div>
 
-        <!-- 查询结果 -->
-        <el-table
-                v-loading="listLoading"
-                :data="list"
-                size="small"
-                element-loading-text="正在查询中。。。"
-                border
-                fit
-                highlight-current-row
-        >
-            <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
-                <template slot-scope="scope">
-                    <el-button v-permission="['productSales:productsales:edit']" type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
-                    <el-button v-permission="['productSales:productsales:delete']" type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
+    <!-- 查询结果 -->
+    <el-table
+      v-loading="listLoading"
+      :data="list"
+      size="small"
+      element-loading-text="正在查询中。。。"
+      border
+      fit
+      highlight-current-row
+    >
+      <el-table-column align="center" label="日期" prop="saleDate" />
+      <el-table-column align="center" label="销售单号" prop="saleNo" />
+      <el-table-column align="center" label="客户名称" prop="customer" />
+      <el-table-column align="center" label="电话" prop="phone" />
+      <el-table-column align="center" label="备注" prop="remark"/>
+      <el-table-column align="center" label="商品名称" prop="tradeName" />
+      <el-table-column align="center" label="货品" prop="articleNo" />
+      <el-table-column align="center" label="规格型号" prop="specification" />
+      <el-table-column align="center" label="销售数量" prop="num" />
+      <el-table-column align="center" label="单位" prop="unit" />
+      <el-table-column align="center" label="期初库存" prop="openingInventory" />
+      <el-table-column align="center" label="当前库存" prop="currentInventory" />
+      <el-table-column align="center" label="单价" prop="price" />
+      <el-table-column align="center" label="单盒成本" prop="singleCost" />
+      <el-table-column align="center" label="折扣" prop="discount" />
+      <el-table-column align="center" label="折后价" prop="discountedPrice" />
+      <el-table-column align="center" label="应收金额" prop="amountReceivable" />
+      <el-table-column align="center" label="实收金额" prop="paidAmount" />
+      <el-table-column align="center" label="总成本" prop="totalCost" />
+      <el-table-column align="center" label="毛利润" prop="paidAmount" />
+      <el-table-column align="center" label="支付方式" prop="payType" />
+      <el-table-column align="center" label="备注" prop="remarks" />
+      <el-table-column align="center" label="操作" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-permission="['productSales:productsales:edit']"
+            type="primary"
+            size="mini"
+            @click="handleUpdate(scope.row)"
+          >编辑</el-button>
+          <el-button
+            v-permission="['productSales:productsales:delete']"
+            type="danger"
+            size="mini"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
 
-        <pagination
-                v-show="total>0"
-                :total="total"
-                :page.sync="listQuery.page"
-                :limit.sync="listQuery.limit"
-                @pagination="getList"
-        />
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="listQuery.page"
+      :limit.sync="listQuery.limit"
+      @pagination="getList"
+    />
 
-        <!-- 添加或修改对话框 -->
-        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
-            <el-form
-                    ref="dataForm"
-                    :rules="rules"
-                    :model="dataForm"
-                    status-icon
-                    label-position="left"
-                    label-width="100px"
-                    style="width: 400px; margin-left:50px;"
-            >
-                <el-form-item label="id" prop="id" hidden>
-                    <el-input v-model="dataForm.id" />
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取消</el-button>
-                <el-button v-if="dialogStatus=='create'" :loading="submiting" type="primary" @click="createData">确定</el-button>
-                <el-button v-else type="primary" :loading="submiting" @click="updateData">确定</el-button>
-            </div>
-        </el-dialog>
-    </div>
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
+      <el-form
+        ref="dataForm"
+        :rules="rules"
+        :model="dataForm"
+        status-icon
+        label-position="left"
+        label-width="100px"
+        style="width: 400px; margin-left:50px;"
+      >
+        <el-form-item label="id" prop="id" hidden>
+          <el-input v-model="dataForm.id" />
+        </el-form-item>
+        <el-form-item label="日期" prop="saleDate">
+          <!-- <el-input v-model="dataForm.receiptPaymentDate" /> -->
+          <el-date-picker
+            v-model="dataForm.saleDate"
+            type="date"
+            class="tkdate"
+            style="width: 100%;"
+            value-format="yyyy-MM-dd"
+          />
+        </el-form-item>
+        <el-form-item label="销售单号" prop="saleNo">
+          <el-input v-model="dataForm.saleNo" />
+        </el-form-item>
+        <el-form-item label="客户名称" prop="customer">
+          <el-input v-model="dataForm.customer" />
+        </el-form-item>
+        <el-form-item label="电话" prop="phone">
+          <el-input v-model="dataForm.phone" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="dataForm.remark" />
+        </el-form-item>
+        <el-form-item label="商品名称" prop="tradeName">
+          <el-input v-model="dataForm.tradeName" />
+        </el-form-item>
+        <el-form-item label="货品" prop="articleNo">
+          <el-input v-model="dataForm.articleNo" />
+        </el-form-item>
+        <el-form-item label="规格型号" prop="specification">
+          <el-input v-model="dataForm.specification" />
+        </el-form-item>
+        <el-form-item label="销售数量" prop="num">
+          <el-input v-model="dataForm.num" />
+        </el-form-item>
+        <el-form-item label="单位" prop="unit">
+          <el-input v-model="dataForm.unit" />
+        </el-form-item>
+        <el-form-item label="期初库存" prop="openingInventory">
+          <el-input v-model="dataForm.openingInventory" />
+        </el-form-item>
+        <el-form-item label="当前库存" prop="currentInventory">
+          <el-input v-model="dataForm.currentInventory" />
+        </el-form-item>
+        <el-form-item label="单价" prop="price">
+          <el-input v-model="dataForm.price"/>
+        </el-form-item>
+        <el-form-item label="单盒成本" prop="singleCost">
+          <el-input v-model="dataForm.singleCost" />
+        </el-form-item>
+        <el-form-item label="折扣" prop="discount">
+          <el-input v-model="dataForm.discount" />
+        </el-form-item>
+        <el-form-item label="折后价" prop="discountedPrice">
+          <el-input v-model="dataForm.discountedPrice" />
+        </el-form-item>
+        <el-form-item label="应收金额" prop="amountReceivable">
+          <el-input v-model="dataForm.amountReceivable" />
+        </el-form-item>
+        <el-form-item label="实收金额" prop="paidAmount">
+          <el-input v-model="dataForm.paidAmount" />
+        </el-form-item>
+        <el-form-item label="总成本" prop="totalCost">
+          <el-input v-model="dataForm.totalCost" />
+        </el-form-item>
+        <el-form-item label="毛利润" prop="paidAmount">
+          <el-input v-model="dataForm.paidAmount" />
+        </el-form-item>
+        <el-form-item label="支付方式" prop="payType">
+          <el-input v-model="dataForm.payType" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="dataForm.remarks" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button
+          v-if="dialogStatus=='create'"
+          :loading="submiting"
+          type="primary"
+          @click="createData"
+        >确定</el-button>
+        <el-button v-else :loading="submiting" type="primary" @click="updateData">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import {
-        listProductSales,
-        createProductSales,
-        updateProductSales,
-        deleteProductSales
-    } from '@/api/productSales'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: 'ProductSales',
-        components: { Pagination },
-        data() {
-            return {
-                list: null,
-                total: 0,
-                listLoading: true,
-                listQuery: {
-                    page: 1,
-                    limit: 20
-                },
-                dataForm: {
-                    id: undefined
-                },
-                dialogFormVisible: false,
-                submiting: false,
-                dialogStatus: '',
-                textMap: {
-                    update: '编辑',
-                    create: '创建'
-                },
-                rules: {
-                }
-            }
-        },
-        created() {
-            this.getList()
-        },
-        methods: {
-            getList() {
-                this.listLoading = true
-                listProductSales(this.listQuery).then(response => {
-                    this.list = response.data.data.items
-                    this.total = response.data.data.total
-                    this.listLoading = false
-                })
-                .catch(() => {
-                    this.list = []
-                    this.total = 0
-                    this.listLoading = false
-                })
-            },
-            handleFilter() {
-                this.listQuery.page = 1
-                this.getList()
-            },
-            resetForm() {
-                this.dataForm = {
-                    id: undefined
+import {
+  listProductSales,
+  createProductSales,
+  updateProductSales,
+  deleteProductSales
+} from '@/api/productSales'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'ProductSales',
+  components: { Pagination },
+  data() {
+    return {
+      list: null,
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        limit: 20
+      },
+      dataForm: {
+        id: undefined
+      },
+      dialogFormVisible: false,
+      submiting: false,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '创建'
+      },
+      rules: {}
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      this.listLoading = true
+      listProductSales(this.listQuery)
+        .then(response => {
+          this.list = response.data.data.items
+          this.total = response.data.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.list = []
+          this.total = 0
+          this.listLoading = false
+        })
+    },
+    handleFilter() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    resetForm() {
+      this.dataForm = {
+        id: undefined
+      }
+    },
+    handleCreate() {
+      this.resetForm()
+      this.dialogStatus = 'create'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    createData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          createProductSales(this.dataForm)
+            .then(response => {
+              this.list.unshift(response.data.data)
+              this.dialogFormVisible = false
+              this.$notify.success({
+                title: '成功',
+                message: '添加成功'
+              })
+              this.submiting = false
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleUpdate(row) {
+      this.dataForm = Object.assign({}, row)
+      this.dialogStatus = 'update'
+      this.dialogFormVisible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].clearValidate()
+      })
+    },
+    updateData() {
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.submiting = true
+          updateProductSales(this.dataForm)
+            .then(() => {
+              for (const v of this.list) {
+                if (v.id === this.dataForm.id) {
+                  const index = this.list.indexOf(v)
+                  this.list.splice(index, 1, this.dataForm)
+                  break
                 }
-            },
-            handleCreate() {
-                this.resetForm()
-                this.dialogStatus = 'create'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            createData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        createProductSales(this.dataForm).then(response => {
-                            this.list.unshift(response.data.data)
-                            this.dialogFormVisible = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '添加成功'
-                            })
-                            this.submiting = false
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleUpdate(row) {
-                this.dataForm = Object.assign({}, row)
-                this.dialogStatus = 'update'
-                this.dialogFormVisible = true
-                this.$nextTick(() => {
-                    this.$refs['dataForm'].clearValidate()
-                })
-            },
-            updateData() {
-                this.$refs['dataForm'].validate(valid => {
-                    if (valid) {
-                        this.submiting = true
-                        updateProductSales(this.dataForm).then(() => {
-                            for (const v of this.list) {
-                                if (v.id === this.dataForm.id) {
-                                    const index = this.list.indexOf(v)
-                                    this.list.splice(index, 1, this.dataForm)
-                                    break
-                                }
-                            }
-                            this.dialogFormVisible = false
-                            this.submiting = false
-                            this.$notify.success({
-                                title: '成功',
-                                message: '更新成功'
-                            })
-                        })
-                        .catch(response => {
-                            this.$notify.error({
-                                title: '失败',
-                                message: response.data.errmsg
-                            })
-                            this.submiting = false
-                        })
-                    }
-                })
-            },
-            handleDelete(row) {
-                this.$confirm('此操作将永久删除该记录---' + row.id + '---, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    deleteProductSales(row.id).then(response => {
-                        this.$notify.success({
-                            title: '成功',
-                            message: '删除成功'
-                        })
-                        const index = this.list.indexOf(row)
-                        this.list.splice(index, 1)
-                    })
-                    .catch(response => {
-                        this.$notify.error({
-                            title: '失败',
-                            message: response.data.errmsg
-                        })
-                    })
-                }).catch(() => {
-                    return false
-                })
-            }
+              }
+              this.dialogFormVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '更新成功'
+              })
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+              this.submiting = false
+            })
+        }
+      })
+    },
+    handleDelete(row) {
+      this.$confirm(
+        '此操作将永久删除该记录---' + row.id + '---, 是否继续?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         }
+      )
+        .then(() => {
+          deleteProductSales(row.id)
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
+              })
+              const index = this.list.indexOf(row)
+              this.list.splice(index, 1)
+            })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+            })
+        })
+        .catch(() => {
+          return false
+        })
     }
+  }
+}
 </script>

+ 1 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/domain/MaritimeDetailDO.java

@@ -32,7 +32,7 @@ public class MaritimeDetailDO extends SuperDO {
     private String weight;
      /* 长 */
     @TableField("long")
-    private String long;
+    private String long1;
      /* 宽 */
     @TableField("wide")
     private String wide;

+ 1 - 1
unimall-data/src/main/java/com/iotechn/unimall/data/dto/MaritimeDetailDTO.java

@@ -24,7 +24,7 @@ public class MaritimeDetailDTO extends SuperDTO {
      /* 实重 */
     private String weight;
      /* 长 */
-    private String long;
+    private String long1;
      /* 宽 */
     private String wide;
      /* 高 */

+ 1 - 1
unimall-launcher/src/main/resources/application.properties

@@ -1,4 +1,4 @@
-server.port=8080
+server.port=8089
 
 logging.path=/opt/logs
 logging.file=unimall.log