Эх сурвалжийг харах

1、客户编辑弹框 2、零售购物列表 3、取衣立刻支付弹框

lhch2015 2 сар өмнө
parent
commit
d2825eba1f

BIN
.DS_Store


+ 4 - 4
admin-ui/.env.development

@@ -5,12 +5,12 @@ VUE_APP_TITLE = zparty管理系统
 ENV = 'development'
 
 
-VUE_APP_BASE_API_HOST = 'http://localhost:9801'
-VUE_APP_BASE_API = 'http://localhost:9801'
+# VUE_APP_BASE_API_HOST = 'http://localhost:9801'
+# VUE_APP_BASE_API = 'http://localhost:9801'
 # VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
 # VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
-# VUE_APP_BASE_API_HOST = 'http://192.168.98.9:9801'
-# VUE_APP_BASE_API = 'http://192.168.98.9:9801/'
+VUE_APP_BASE_API_HOST = 'http://192.168.5.124:9801'
+VUE_APP_BASE_API = 'http://192.168.5.124:9801/'
 
 
 # 路由懒加载

+ 387 - 375
admin-ui/src/components/payStatusPopup/index.vue

@@ -1,112 +1,112 @@
 <template>
-    <div class="payStatusPopup">
-        <el-dialog :visible.sync="show" width="30%" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" append-to-body custom-class="popup_box">
-            <!-- 支付成功打印小票 -->
-            <div v-if="type === 1">
-                <div class="icon">
-                    <i class="el-icon-success success"></i>
-                </div>
-                <div class="message">支付成功</div>
-                <div class="btn_box" v-if="hidePointer">
-                    <div class="btn" @click="confirm">确认</div>
-                </div>
-                <div class="btn_box" v-else>
-                    <div class="btn" @click="setPointer(0)">打印小票</div>
-                    <div class="line"></div>
-                    <div class="btn" @click="setPointer(1)">打印条码</div>
-                    <div class="line"></div>
-                    <div class="btn" @click="close">关闭</div>
-                </div>
-            </div>
-            <!-- 未支付 -->
-            <div v-if="type === 2">
-                <div class="icon">
-
-                    <i class="el-icon-warning warning"></i>
-                </div>
-                <div class="message">请支付后取衣</div>
-                <div class="cell">
-                    <div class="label">需支付金额</div>
-                    <div class="amount_box">
-                        <span>¥</span>
-                        <span>{{ orderInfo.payAmount }}</span>
-                    </div>
-                </div>
-                <div class="cell">
-                    <div class="label">支付方式</div>
-                    <el-radio-group v-model="payType" @input="changePayType">
-                        <el-radio-button :label="3">余额</el-radio-button>
-                        <el-radio-button :label="2">现金</el-radio-button>
-                        <el-radio-button :label="0">微信/支付宝</el-radio-button>
-                    </el-radio-group>
-                </div>
-                <el-descriptions border direction="vertical" :column="3" :labelStyle="{ width: '140px' }" v-if="payType == '3'" style="margin: 0 30px">
-                    <el-descriptions-item label="用户" v-if="appUserInfo">{{ appUserInfo.realName }}</el-descriptions-item>
-                    <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
-                    <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - orderInfo.payAmount }}</el-descriptions-item>
-                </el-descriptions>
-                <div class="cell" v-if="payType == 0">
-                    <div class="label">付款码</div>
-                    <!-- @change="handleQuery" -->
-                    <el-input ref="autoFocus" v-model="authCode" clearable placeholder="请选择付款码" />
-                </div>
-                <div class="btn_box">
-                    <div class="btn" style="color: #67c23a" @click="pay">确认支付</div>
-                    <div class="line"></div>
-                    <div class="btn" @click="close">关闭</div>
-                </div>
-            </div>
-            <!-- 支付中,请等待 -->
-            <div v-if="type == 3 || type == 5">
-                <div class="icon">
-                    <i class="el-icon-loading loading"></i>
-                </div>
-                <div class="message">支付确认中,请等待...</div>
-
-                <el-button type="primary" style="width: 70%; height: 40px; margin: 20px 15%" @click="close" v-if="showPaySuccessBtn">已确认支付</el-button>
-            </div>
-            <!-- 支付失败 -->
-            <div v-if="type == 4">
-                <div class="icon">
-                    <i class="el-icon-error error"></i>
-                </div>
-                <div class="message">{{ errorMessage }}</div>
-                <div class="cell" v-if="!hideUser">
-                    <div class="label">支付方式</div>
-                    <el-radio-group v-model="payType" @input="changePayType">
-                        <el-radio-button :label="3">余额</el-radio-button>
-                        <el-radio-button :label="2">现金</el-radio-button>
-                        <el-radio-button :label="0">微信/支付宝</el-radio-button>
-                    </el-radio-group>
-                </div>
-                <el-descriptions border direction="vertical" :column="3" :labelStyle="{ width: '140px' }" v-if="payType == '3' && !hideUser" style="margin: 0 30px">
-                    <el-descriptions-item label="用户" v-if="appUserInfo">{{ appUserInfo.realName }}</el-descriptions-item>
-                    <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
-                    <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - orderInfo.payAmount }}</el-descriptions-item>
-                </el-descriptions>
-                <div class="cell" v-if="payType == 0 && !hideUser">
-                    <div class="label">付款码</div>
-                    <!-- @change="handleQuery" -->
-                    <el-input ref="autoFocus" v-model="authCode" clearable placeholder="请选择付款码" />
-                </div>
-                <div class="btn_box">
-                    <div class="btn" style="color: #67c23a" @click="pay" v-if="!hideUser">确认支付</div>
-                    <div class="line" v-if="!hideUser"></div>
-                    <div class="btn" @click="close">关闭</div>
-                </div>
-            </div>
-            <!-- 支付成功打印小票 -->
-            <div v-if="type === 6">
-                <div class="icon">
-                    <i class="el-icon-success success"></i>
-                </div>
-                <div class="message">定价成功</div>
-                <div class="btn_box">
-                    <div class="btn" @click="confirm">确认</div>
-                </div>
-            </div>
-        </el-dialog>
-    </div>
+  <div class="payStatusPopup">
+    <el-dialog :visible.sync="show" width="600px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" append-to-body custom-class="popup_box">
+      <!-- 支付成功打印小票 -->
+      <div v-if="type === 1">
+        <div class="icon">
+          <i class="el-icon-success success"></i>
+        </div>
+        <div class="message">支付成功</div>
+        <div class="btn_box" v-if="hidePointer">
+          <div class="btn" @click="confirm">确认</div>
+        </div>
+        <div class="btn_box" v-else>
+          <div class="btn" @click="setPointer(0)">打印小票</div>
+          <div class="line"></div>
+          <div class="btn" @click="setPointer(1)">打印条码</div>
+          <div class="line"></div>
+          <div class="btn" @click="close">关闭</div>
+        </div>
+      </div>
+      <!-- 未支付 -->
+      <div v-if="type === 2">
+        <div class="icon">
+
+          <i class="el-icon-warning warning"></i>
+        </div>
+        <div class="message">请支付后取衣</div>
+        <div class="cell">
+          <div class="label">需支付金额</div>
+          <div class="amount_box">
+            <span>¥</span>
+            <span>{{ orderInfo.payAmount }}</span>
+          </div>
+        </div>
+        <div class="cell">
+          <div class="label">支付方式</div>
+          <el-radio-group v-model="payType" @input="changePayType">
+            <el-radio-button :label="3">余额</el-radio-button>
+            <el-radio-button :label="2">现金</el-radio-button>
+            <el-radio-button :label="0">微信/支付宝</el-radio-button>
+          </el-radio-group>
+        </div>
+        <el-descriptions border direction="vertical" :column="3" :labelStyle="{ width: '140px' }" v-if="payType == '3'" style="margin: 0 30px">
+          <el-descriptions-item label="用户" v-if="appUserInfo">{{ appUserInfo.realName }}</el-descriptions-item>
+          <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
+          <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - orderInfo.payAmount }}</el-descriptions-item>
+        </el-descriptions>
+        <div class="cell" v-if="payType == 0">
+          <div class="label">付款码</div>
+          <!-- @change="handleQuery" -->
+          <el-input ref="autoFocus" v-model="authCode" clearable placeholder="请选择付款码" />
+        </div>
+        <div class="btn_box">
+          <div class="btn" style="color: #67c23a" @click="pay">确认支付</div>
+          <div class="line"></div>
+          <div class="btn" @click="close">关闭</div>
+        </div>
+      </div>
+      <!-- 支付中,请等待 -->
+      <div v-if="type == 3 || type == 5">
+        <div class="icon">
+          <i class="el-icon-loading loading"></i>
+        </div>
+        <div class="message">支付确认中,请等待...</div>
+
+        <el-button type="primary" style="width: 70%; height: 40px; margin: 20px 15%" @click="close" v-if="showPaySuccessBtn">已确认支付</el-button>
+      </div>
+      <!-- 支付失败 -->
+      <div v-if="type == 4">
+        <div class="icon">
+          <i class="el-icon-error error"></i>
+        </div>
+        <div class="message">{{ errorMessage }}</div>
+        <div class="cell" v-if="!hideUser">
+          <div class="label">支付方式</div>
+          <el-radio-group v-model="payType" @input="changePayType">
+            <el-radio-button :label="3">余额</el-radio-button>
+            <el-radio-button :label="2">现金</el-radio-button>
+            <el-radio-button :label="0">微信/支付宝</el-radio-button>
+          </el-radio-group>
+        </div>
+        <el-descriptions border direction="vertical" :column="3" :labelStyle="{ width: '140px' }" v-if="payType == '3' && !hideUser" style="margin: 0 30px">
+          <el-descriptions-item label="用户" v-if="appUserInfo">{{ appUserInfo.realName }}</el-descriptions-item>
+          <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
+          <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - orderInfo.payAmount }}</el-descriptions-item>
+        </el-descriptions>
+        <div class="cell" v-if="payType == 0 && !hideUser">
+          <div class="label">付款码</div>
+          <!-- @change="handleQuery" -->
+          <el-input ref="autoFocus" v-model="authCode" clearable placeholder="请选择付款码" />
+        </div>
+        <div class="btn_box">
+          <div class="btn" style="color: #67c23a" @click="pay" v-if="!hideUser">确认支付</div>
+          <div class="line" v-if="!hideUser"></div>
+          <div class="btn" @click="close">关闭</div>
+        </div>
+      </div>
+      <!-- 支付成功打印小票 -->
+      <div v-if="type === 6">
+        <div class="icon">
+          <i class="el-icon-success success"></i>
+        </div>
+        <div class="message">定价成功</div>
+        <div class="btn_box">
+          <div class="btn" @click="confirm">确认</div>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -116,294 +116,306 @@ import { getMemberInfoById } from '@/api/app/user'
 import { clothOrderPay, getOrderPayResult } from '@/api/order/cloth'
 
 export default {
-    props: {
-        hidePointer: {
-            type: Boolean,
-            default: false
-        },
-        hideUser: {
-            type: Boolean,
-            default: false
-        }
+  props: {
+    hidePointer: {
+      type: Boolean,
+      default: false
+    },
+    hideUser: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      show: false,
+      type: 1,
+      orderInfo: {},
+      number: 1,
+      // 打印机设置
+      LODOP: null,
+      pointerList: [],
+      // 打印收衣订单的数据
+      pointerInfo: null,
+      payType: 3,
+      appUserInfo: {},
+      authCode: '',
+      time: '',
+      showPaySuccessBtn: false,
+      resultCount: 0,
+      errorMessage: ''
+    }
+  },
+
+  mounted() {
+    this.number = 1
+    const printerTime = setInterval(() => {
+      this.LODOP = getLodop()
+      this.number++
+      if (this.number == 25) {
+        clearInterval(printerTime)
+      }
+      if (this.LODOP) {
+        clearInterval(printerTime)
+      }
+    }, 200)
+
+    this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
+  },
+
+  methods: {
+    openSelected(info) {
+      console.log()
+      this.orderInfo = info
+      this.type = 2
+      if (this.hideUser) {
+        this.payType = 2
+      } else {
+        this.payType = 2
+        this.getUserInfo(info.appUserId)
+      }
+      this.show = true
     },
-    data() {
-        return {
-            show: false,
-            type: 1,
-            orderInfo: {},
-            number: 1,
-            // 打印机设置
-            LODOP: null,
-            pointerList: [],
-            // 打印收衣订单的数据
-            pointerInfo: null,
-            payType: 3,
-            appUserInfo: {},
-            authCode: '',
-            time: '',
-            showPaySuccessBtn: false,
-            resultCount: 0,
-            errorMessage: ''
+    open(type, info, appUserInfo = null) {
+      this.orderInfo = info
+      this.type = type
+      this.showPaySuccessBtn = false
+      console.log(this.type)
+      if (type == 0) {
+        //微信支付宝支付
+        this.payType = 0
+        this.authCode = info.authCode
+        this.showPaySuccessBtn = false
+        if (appUserInfo) {
+          this.appUserInfo = appUserInfo
+        }
+        console.log('aasss', this.appUserInfo)
+        this.pay()
+      }
+      if (type == 1) {
+        if (info.id && !this.hidePointer) {
+          this.getClothItemInfo(info)
+        }
+      }
+      if (type == 2) {
+        //现金支付
+        this.appUserInfo = {}
+        this.authCode = ''
+        this.showPaySuccessBtn = false
+        if (this.hideUser) {
+          this.payType = 2
+        } else {
+          this.payType = 2
+          this.getUserInfo(info.appUserId)
         }
+        this.pay()
+
+      }
+      if (type == 3) {
+        //会员支付
+        this.payType = 3
+        this.showPaySuccessBtn = false
+        if (appUserInfo) {
+          this.appUserInfo = appUserInfo
+        }
+        console.log('aasss', this.appUserInfo)
+        this.pay()
+      }
+      if (type == 4) {
+        this.errorMessage = info.payMsg
+      }
+      if (type == 5) {
+        // this.getPayResult()
+      }
+      if (type == 6) {
+
+      }
+      this.show = true
     },
 
-    mounted() {
-        this.number = 1
-        const printerTime = setInterval(() => {
-            this.LODOP = getLodop()
-            this.number++
-            if (this.number == 25) {
-                clearInterval(printerTime)
-            }
-            if (this.LODOP) {
-                clearInterval(printerTime)
-            }
-        }, 200)
+    close() {
+      const _ = this
+      if (this.type == 1) {
+        this.$confirm('是否关闭打印操作?')
+          .then(() => {
+            _.show = false
+            _.$emit('close')
+          })
+          .catch(() => { })
+      }
+      if (this.type == 2) {
+        this.$confirm('是否取消支付操作?')
+          .then(() => {
+            _.show = false
+          })
+          .catch(() => { })
+      }
+      if (this.type == 3 || this.type == 5) {
+        this.$confirm('请确认客户已完成付款再关闭?')
+          .then(() => {
+            _.show = false
+            _.clearTimeOut(_.time)
+            _.$emit('paySuccess')
+          })
+          .catch(() => { })
+      }
+      if (this.type == 4) {
+        _.show = false
+      }
+      if (this.type == 6) {
+        _.show = false
+      }
+    },
 
-        this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
+    confirm() {
+      this.show = false
+      this.$emit('confirm', this.orderInfo)
     },
 
-    methods: {
-        open(type, info, appUserInfo = null) {
-            this.orderInfo = info
-            this.type = type
-          this.showPaySuccessBtn = false
-          console.log(this.type)
-            if (type == 0) {
-              //微信支付宝支付
-              this.payType = 0
-              this.authCode = info.authCode
-              this.showPaySuccessBtn = false
-              if (appUserInfo) {
-                this.appUserInfo = appUserInfo
-              }
-              console.log('aasss', this.appUserInfo)
-              this.pay()
-            }
-            if (type == 1) {
-                if (info.id && !this.hidePointer) {
-                    this.getClothItemInfo(info)
-                }
-            }
-            if (type == 2) {
-              //现金支付
-                this.appUserInfo = {}
-                this.authCode = ''
-                this.showPaySuccessBtn = false
-                if (this.hideUser) {
-                  this.payType = 2
-                } else {
-                  this.payType = 2
-                    this.getUserInfo(info.appUserId)
-                }
-              this.pay()
+    setPointer(type) {
+      if (!this.LODOP) {
+        this.$modal.msgError('请安装打印机软件')
+        return
+      }
 
-            }
-            if (type == 3) {
-              //会员支付
-                this.payType = 3
-                this.showPaySuccessBtn = false
-                if (appUserInfo) {
-                    this.appUserInfo = appUserInfo
-                }
-                console.log('aasss', this.appUserInfo)
-                this.pay()
-            }
-            if (type == 4) {
-                this.errorMessage = info.payMsg
-            }
-            if (type == 5) {
-                // this.getPayResult()
-            }
-            if (type == 6) {
+      let p_name = ''
 
-            }
-            this.show = true
-        },
-
-        close() {
-            const _ = this
-            if (this.type == 1) {
-                this.$confirm('是否关闭打印操作?')
-                    .then(() => {
-                        _.show = false
-                        _.$emit('close')
-                    })
-                    .catch(() => {})
-            }
-            if (this.type == 2) {
-                this.$confirm('是否取消支付操作?')
-                    .then(() => {
-                        _.show = false
-                    })
-                    .catch(() => {})
-            }
-            if (this.type == 3 || this.type == 5) {
-                this.$confirm('请确认客户已完成付款再关闭?')
-                    .then(() => {
-                        _.show = false
-                        _.clearTimeOut(_.time)
-                        _.$emit('paySuccess')
-                    })
-                    .catch(() => {})
-            }
-            if (this.type == 4) {
-                _.show = false
-            }
-            if (this.type == 6) {
-                _.show = false
-            }
-        },
+      this.pointerList.forEach((pointer) => {
+        if (pointer.printType == type) {
+          p_name = pointer.printName
+        }
+      })
 
-        confirm() {
-            this.show = false
-            this.$emit('confirm', this.orderInfo)
-        },
+      if (type == 0) {
+        this.collectClothPrinter(this.LODOP, this.pointerInfo, p_name)
+      } else {
+        this.barCodePrinter(this.LODOP, this.pointerInfo, p_name)
+      }
 
-        setPointer(type) {
-            if (!this.LODOP) {
-                this.$modal.msgError('请安装打印机软件')
-                return
-            }
+      this.show = false
+    },
 
-            let p_name = ''
+    // 获取打印数据
+    getClothItemInfo(data) {
+      getClothItem(data.id).then((res) => {
+        if (res) {
+          this.pointerInfo = res.data
+          listOrderClothItem({ pageSize: 99999, pageNum: 1, orderNo: data.orderNo }).then((res) => {
+            console.log(res)
+            this.pointerInfo.orderClothDetails = res.rows
+          })
+        }
+      })
+    },
 
-            this.pointerList.forEach((pointer) => {
-                if (pointer.printType == type) {
-                    p_name = pointer.printName
-                }
-            })
+    // 获取用户信息
+    getUserInfo(id) {
+      getMemberInfoById({
+        appUserId: id
+      }).then((response) => {
+        this.appUserInfo = response.data
+      })
+    },
+
+    changePayType() {
+      if (this.payType == 0) {
+        this.$nextTick((_) => {
+          this.$refs.autoFocus.focus()
+        })
+      }
+    },
+
+    handleQuery(e, event) {
+      console.log(event)
+      console.log(this.authCode)
+    },
 
-            if (type == 0) {
-                this.collectClothPrinter(this.LODOP, this.pointerInfo, p_name)
-            } else {
-                this.barCodePrinter(this.LODOP, this.pointerInfo, p_name)
+    pay() {
+      if (this.payType == 0 && !this.authCode) {
+        this.type = 4
+        this.errorMessage = '请先扫码'
+        this.authCode = ''
+        this.changePayType()
+        return
+      }
+      if (this.payType == 3 && this.appUserInfo.rechargeBalance + this.appUserInfo.giveBalance < this.orderInfo.payAmount) {
+        this.errorMessage = '余额不足'
+        this.type = 4
+        this.authCode = ''
+        this.changePayType()
+        return
+      }
+      this.type = 3
+      clothOrderPay({
+        appUserId: this.orderInfo.appUserId,
+        payType: this.payType,
+        authCode: this.authCode,
+        orderNo: this.orderInfo.orderNo,
+        payAmount: this.orderInfo.payAmount
+      })
+        .then((res) => {
+          console.log('支付结果', res)
+          if (res) {
+            if (res.data.payResult == 100) {
+              this.getPayResult()
             }
+            if (res.data.payResult == 101 || res.data.payResult == 0) {
+              this.errorMessage = res.data.payMsg
+              this.type = 4
+              this.authCode = ''
+              this.changePayType()
+            }
+            if (res.data.payResult == 200) {
+              this.type = 1
+              this.$emit('paySuccess')
+            }
+          }
+        })
+        .catch((e) => {
+          this.type = 4
+          this.authCode = ''
+          this.changePayType()
+          this.errorMessage = e.data.msg
+          // this.$message.error(e.data.msg)
+        })
+    },
 
-            this.show = false
-        },
-
-        // 获取打印数据
-        getClothItemInfo(data) {
-            getClothItem(data.id).then((res) => {
-                if (res) {
-                    this.pointerInfo = res.data
-                    listOrderClothItem({ pageSize: 99999, pageNum: 1, orderNo: data.orderNo }).then((res) => {
-                        console.log(res)
-                        this.pointerInfo.orderClothDetails = res.rows
-                    })
+    getPayResult() {
+      getOrderPayResult({
+        orderNo: this.orderInfo.orderNo
+      })
+        .then((res) => {
+          console.log('支付结果1', res)
+          if (res) {
+            if (res.data.payResult == 100) {
+              this.time = setTimeout(() => {
+                if (this.resultCount == 6) {
+                  this.showPaySuccessBtn = true
+                } else {
+                  this.resultCount++
                 }
-            })
-        },
-
-        // 获取用户信息
-        getUserInfo(id) {
-            getMemberInfoById({
-                appUserId: id
-            }).then((response) => {
-                this.appUserInfo = response.data
-            })
-        },
-
-        changePayType() {
-            if (this.payType == 0) {
-                this.$nextTick((_) => {
-                    this.$refs.autoFocus.focus()
-                })
+                this.getPayResult()
+              }, 5000)
             }
-        },
-
-        handleQuery(e, event) {
-            console.log(event)
-            console.log(this.authCode)
-        },
-
-        pay() {
-            if (this.payType == 0 && !this.authCode) {
-                this.type = 4
-                this.errorMessage = '请先扫码'
-                this.authCode = ''
-                this.changePayType()
-                return
+            if (res.data.payResult == 101 || res.data.payResult == 0) {
+              this.errorMessage = res.data.payMsg
+              this.type = 4
+              this.authCode = ''
+              this.changePayType()
             }
-            if (this.payType == 3 && this.appUserInfo.rechargeBalance + this.appUserInfo.giveBalance < this.orderInfo.payAmount) {
-                this.errorMessage = '余额不足'
-                this.type = 4
-                this.authCode = ''
-                this.changePayType()
-                return
+            if (res.data.payResult == 200) {
+              this.type = 1
+              this.$emit('paySuccess')
             }
-            this.type = 3
-            clothOrderPay({
-                appUserId: this.orderInfo.appUserId,
-                payType: this.payType,
-                authCode: this.authCode,
-                orderNo: this.orderInfo.orderNo,
-                payAmount: this.orderInfo.payAmount
-            })
-                .then((res) => {
-                    console.log('支付结果', res)
-                    if (res) {
-                        if (res.data.payResult == 100) {
-                            this.getPayResult()
-                        }
-                        if (res.data.payResult == 101 || res.data.payResult == 0) {
-                            this.errorMessage = res.data.payMsg
-                            this.type = 4
-                            this.authCode = ''
-                            this.changePayType()
-                        }
-                        if (res.data.payResult == 200) {
-                            this.type = 1
-                            this.$emit('paySuccess')
-                        }
-                    }
-                })
-                .catch((e) => {
-                    this.type = 4
-                    this.authCode = ''
-                    this.changePayType()
-                    this.errorMessage = e.data.msg
-                    // this.$message.error(e.data.msg)
-                })
-        },
-
-        getPayResult() {
-            getOrderPayResult({
-                orderNo: this.orderInfo.orderNo
-            })
-                .then((res) => {
-                    console.log('支付结果1', res)
-                    if (res) {
-                        if (res.data.payResult == 100) {
-                            this.time = setTimeout(() => {
-                                if (this.resultCount == 6) {
-                                    this.showPaySuccessBtn = true
-                                } else {
-                                    this.resultCount++
-                                }
-                                this.getPayResult()
-                            }, 5000)
-                        }
-                        if (res.data.payResult == 101 || res.data.payResult == 0) {
-                            this.errorMessage = res.data.payMsg
-                            this.type = 4
-                            this.authCode = ''
-                            this.changePayType()
-                        }
-                        if (res.data.payResult == 200) {
-                            this.type = 1
-                            this.$emit('paySuccess')
-                        }
-                    }
-                })
-                .catch((e) => {
-                    this.type = 4
-                    this.authCode = ''
-                    this.errorMessage = e.data.msg
-                })
-        }
+          }
+        })
+        .catch((e) => {
+          this.type = 4
+          this.authCode = ''
+          this.errorMessage = e.data.msg
+        })
     }
+  }
 }
 </script>
 <style>

+ 1 - 1
admin-ui/src/views/app/user/component/editUser.vue

@@ -2,7 +2,7 @@
   <div v-loading="dialogLoading" :element-loading-text="loadingText">
 
     <el-row :gutter="15" >
-      <el-form ref="form" :model="dataSource" :rules="rules" label-width="100px">
+      <el-form ref="form" :model="dataSource" :rules="isDisabled ? {} : rules" label-width="100px">
         <el-col :span="24">
           <el-form-item label="昵称" prop="nickName">
             <el-input v-model="dataSource.nickName" placeholder="请输入昵称" maxlength="50" show-word-limit clearable :disabled="isDisabled"/>

+ 10 - 0
admin-ui/src/views/app/user/index.vue

@@ -327,6 +327,10 @@
                 </el-card>
             </div>
         </el-dialog>
+        <!-- 编辑用户信息 -->
+        <el-dialog :title="title" :visible.sync="open" width="60%" :before-close="closeDialog" append-to-body>
+            <EditUser :dataSource="form" :isDisabled="isDisabled" @onSubmit="handleSubmit" />
+        </el-dialog>
     </div>
 </template>
 
@@ -452,6 +456,11 @@ export default {
             }
             this.resetForm('form')
         },
+        // 编辑会员
+        handleSubmit() {
+            this.open = false
+            this.getList()
+        },
         /** 搜索按钮操作 */
         handleQuery() {
             this.getList()
@@ -479,6 +488,7 @@ export default {
             this.reset()
             const id = row.id || this.ids
             getUser(id).then((response) => {
+                console.log("AAAA")
                 this.form = response.data
                 this.open = true
                 this.isDisabled = true

+ 2 - 0
admin-ui/src/views/goods/commonGoods/index.vue

@@ -545,6 +545,8 @@ export default {
       const id = row.id || this.ids
       getGoods(id).then((response) => {
         this.form = response.data
+        this.form.brandId = Number(this.form.brandId)
+        this.form.goodsCategoryId = Number(this.form.goodsCategoryId)
         if (this.form.goodsImgs != null && this.form.goodsImgs != '') {
           this.form.goodsImgs.split(',').forEach((item) => {
             const vo = {

+ 1 - 1
admin-ui/src/views/order/cloth/sendCloth.vue

@@ -430,7 +430,7 @@ export default {
                 return
             }
             try {
-                this.$refs.payStatusPopup.open(2, scope.row)
+                this.$refs.payStatusPopup.openSelected(scope.row)
             } catch (error) {
                 console.error('支付调用失败:', error)
                 this.$message.error('支付调用失败,请重试')

+ 69 - 6
admin-ui/src/views/workbench/workRetail/index.vue

@@ -62,7 +62,36 @@
             </div>
 
             <div class="cart-list" :class="{'empty': !addGoodsList.length}">
-              <el-table
+              <div v-if="addGoodsList.length">
+                  <div class="cart-item" v-for="(item, i) in addGoodsList" :key="i">
+                    <el-button type="text" class="delete-btn" @click="deleteGoods(item)">
+                      <i class="el-icon-delete"></i>
+                    </el-button>
+                    <div class="item-header">
+                      <div class="goods-info">
+                        <div class="goods-name">{{item.goodsName}}</div>
+                        <div class="goods-spec">{{formatSpec(item.specValLists)}}</div>
+                      </div>
+                      <div class="price" style="margin-top: 5px;">
+                        <div>
+                          <span style="font-size: 10px;">¥</span>
+                          <span>{{formatMoney(item.salePrice)}}</span>
+                        </div>
+                        <el-input-number
+                          v-model="getPurchaseCount(item).count"
+                          :min="1"
+                          :max="item.stock"
+                          size="mini"
+                          style="width: 100px;"
+                          @change="countPrice"
+                        ></el-input-number>
+                        <!-- <span class="subtotal">¥{{formatMoney(item.salePrice * getPurchaseCount(item).count)}}</span> -->
+                      </div>
+                    </div>
+
+                  </div>
+              </div>
+              <!-- <el-table
                 v-if="addGoodsList.length"
                 :data="addGoodsList"
                 size="midium"
@@ -100,7 +129,7 @@
                     </el-button>
                   </template>
                 </el-table-column>
-              </el-table>
+              </el-table> -->
               <div v-else class="empty-cart">
                 <img
                     :src="noGoodsImage"
@@ -606,11 +635,12 @@ export default {
       this.$forceUpdate();
     },
     // 操作数量增减时,计算价格
-    countPrice() {
+    countPrice(e) {
+      console.log(e)
       this.totalPrice = 0;
       this.totalCount = 0;
       this.addGoodsList.forEach(vo => {
-        let number = this.purchaseCountVOList.find(item => item.goodsSkuStoreId == vo.goodsSkuStoreId).count;
+        let number = !e ? 1 : this.purchaseCountVOList.find(item => item.goodsSkuStoreId == vo.goodsSkuStoreId).count;
         this.totalPrice = this.totalPrice + (number * vo.salePrice);
         this.totalCount = this.totalCount + number;
       })
@@ -778,7 +808,11 @@ export default {
 
     // 获取商品购买数量
     getPurchaseCount(goods) {
-      return this.purchaseCountVOList.find(item => item.goodsSkuStoreId === goods.goodsSkuStoreId) || { count: 0 };
+      let sku = this.purchaseCountVOList.find(item => item.goodsSkuStoreId === goods.goodsSkuStoreId)
+      if (!sku.count) {
+        sku.count = 1;
+      }
+      return sku
     },
 
     // 处理搜索
@@ -1104,7 +1138,8 @@ export default {
       }
 
       .cart-list {
-        flex: 1;
+        // flex: 1;
+        height: calc(100vh - 420px);
         overflow-y: auto;
 
         &.empty {
@@ -1127,6 +1162,31 @@ export default {
           }
         }
 
+        .cart-item {
+          // display: flex;
+          // align-items: center;
+          padding: 15px 10px;
+          border-bottom: 1px dashed #ebeef5;
+          position: relative;
+          width: 100%;
+
+          &:last-child {
+            border-bottom: none;
+          }
+          .item-body {
+            display: flex;
+            flex-direction: column;
+            align-items: flex-end;
+            justify-content: space-between;
+          }
+
+          .price {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+          }
+        }
+
         .goods-info {
           .goods-name {
             font-size: 13px;
@@ -1147,6 +1207,9 @@ export default {
 
         .delete-btn {
           padding: 0;
+          position: absolute;
+          top: 16px;
+          right: 10px;
 
           i {
             font-size: 16px;