Browse Source

Merge branch 'dev' of http://159.75.201.17:3000/zwq/tuanfeng-pc-admin into dev

GuYun-D 4 months ago
parent
commit
cb27adc414
4 changed files with 29 additions and 3 deletions
  1. 1 0
      package.json
  2. 22 0
      public/js/copyDist.js
  3. 5 2
      src/views/finance/withdrawal/index.vue
  4. 1 1
      src/views/order/pending/index.vue

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "dev": "vue-cli-service serve",
     "build:prod": "vue-cli-service build",
     "build:stage": "vue-cli-service build --mode staging",
+    "build:deploy": "vue-cli-service build --mode staging && node public/js/copyDist.js",
     "preview": "node build/index.js --preview",
     "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
     "lint": "eslint --fix --ext .js,.vue src",

+ 22 - 0
public/js/copyDist.js

@@ -0,0 +1,22 @@
+const { exec } = require('child_process');
+const path = require('path');
+
+// 获取当前工作目录并生成 dist 路径
+const distPath = path.join(process.cwd(), 'dist');
+const targetPath = '\\\\192.168.0.152\\web\\shop\\nsadmin';
+
+// 构建 xcopy 命令
+const command = `xcopy "${distPath}" "${targetPath}" /E /H /Y`;
+
+// 执行 xcopy 命令
+exec(command, (error, stdout, stderr) => {
+    if (error) {
+        console.error(`执行错误: ${error.message}`);
+        return;
+    }
+    if (stderr) {
+        console.error(`错误输出: ${stderr}`);
+        return;
+    }
+    console.log(`输出: ${stdout}`);
+});

+ 5 - 2
src/views/finance/withdrawal/index.vue

@@ -26,8 +26,11 @@
           <template slot-scope="{ row }">
             <el-tag v-if="row.withdrawalType === 1" effect="plain" type="info">普通订单</el-tag>
             <el-tag v-else-if="row.withdrawalType === 2" effect="plain" type="success">交易金</el-tag>
-            <el-tag v-else-if="row.withdrawalType === 3" effect="plain" type="warning">充值代金券</el-tag>
-            <el-tag v-else-if="row.withdrawalType === 4" effect="plain" type="danger">兑换代金券</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 3" effect="plain" type="success">代金券</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 4" effect="plain" type="success">余额支付</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 5" effect="plain" type="success">佣金支付</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 31" effect="plain" type="warning">充值代金券</el-tag>
+            <el-tag v-else-if="row.withdrawalType === 32" effect="plain" type="danger">兑换代金券(非兑换专区)</el-tag>
           </template>
         </el-table-column>
         <el-table-column align="center" width="120" label="提现金额" prop="withdrawalMoney" show-overflow-tooltip />

+ 1 - 1
src/views/order/pending/index.vue

@@ -134,7 +134,7 @@
               详情
             </el-button>
             <el-button
-              v-if="row.state === 1" type="danger" size="mini"
+              v-if="row.state === 1 || row.state === 8" type="danger" size="mini"
               @click="$refs.PaymentStatusUpdate && $refs.PaymentStatusUpdate.handleOpen(row)"
             >
               同步支付状态