Преглед на файлове

Merge remote-tracking branch 'origin/master'

xuhaifeng преди 1 месец
родител
ревизия
c0b5e4fb9e

BIN
.DS_Store


+ 1 - 1
admin-ui/src/components/GoodsSkuDialog/index.vue

@@ -44,7 +44,7 @@
                             @change="handlePriceStockChange(scope.row)" />
                     </template>
                 </el-table-column>
-                <el-table-column :label="userInfoVO.userType == '00' ? '批发价(元)' : '采购价(元)'" align="center" width="180">
+                <el-table-column label="批发价(元)" align="center" width="180">
                     <template slot-scope="scope">
                         <el-input-number
                             v-model="scope.row.purchasePrice"

+ 1 - 0
admin-ui/src/components/Page/index.vue

@@ -132,6 +132,7 @@ export default {
                     if (this.renderFun) {
                         this.renderFun(data.rows, data)
                     } else {
+                        console.log(data)
                         this.data = data.rows
                     }
                 } else {

+ 24 - 4
admin-ui/src/components/payStatusPopup/index.vue

@@ -11,9 +11,15 @@
           <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>
+          <template v-if="isRecharge">
+            <div class="btn" @click="setPointer(0)">打印小票</div>
+          </template>
+          <template v-else>
+            <div class="btn" @click="setPointer(0)">打印小票</div>
+            <div class="line"></div>
+            <div class="btn" @click="setPointer(1)">打印条码</div>
+          </template>
+        
           <div class="line"></div>
           <div class="btn" @click="close">关闭</div>
         </div>
@@ -133,6 +139,10 @@ export default {
     hideUser: {
       type: Boolean,
       default: false
+    },
+    isRecharge: {
+      type: Boolean,
+      default: false
     }
   },
   data() {
@@ -307,9 +317,18 @@ export default {
           p_name = pointer.printName
         }
       })
+      if (this.isRecharge) {
+        this.$emit('pointer', {
+          id: this.orderInfo.orderId,
+          appUserInfo: this.appUserInfo,
+          LODOP: this.LODOP,
+          p_name: p_name
+        })
+        return 
+      }
       console.log(this.pointerList, p_name)
       getStore(this.orderInfo.orgId).then(res => {
-        console.log("AAA", res)
+        console.log("AAA", res,  this.pointerInfo)
         this.pointerInfo.sysOrg = res.data
         // this.pointerInfo.orgName = res.data.name
         this.pointerInfo.memberPrice = this.appUserInfo.rechargeBalance
@@ -319,6 +338,7 @@ export default {
         this.pointerInfo.contactPhone = this.orderInfo.contactPhone
         this.pointerInfo.payType = this.orderInfo.payType
         this.pointerInfo.payTimeType = this.orderInfo.payTimeType
+        this.pointerInfo.payAmount = this.orderInfo.payAmount
         console.log(this.appUserInfo)
         if (this.appUserInfo.defaultAddress) {
           this.pointerInfo.province = this.appUserInfo.defaultAddress.province

+ 2 - 0
admin-ui/src/main.js

@@ -51,6 +51,7 @@ import {getUserInfo} from "@/utils/auth";
 import {
   getUrlParam,
   isEmpty,
+  exchangeClothPrinter,
   collectClothPrinter,
   sendClothPrinter,
   labelPrinter,
@@ -76,6 +77,7 @@ Vue.prototype.handleTree = handleTree
 Vue.prototype.getUrlParam = getUrlParam
 Vue.prototype.isEmpty = isEmpty
 Vue.prototype.collectClothPrinter = collectClothPrinter
+Vue.prototype.exchangeClothPrinter = exchangeClothPrinter
 Vue.prototype.sendClothPrinter = sendClothPrinter
 Vue.prototype.labelPrinter = labelPrinter
 Vue.prototype.barCodePrinter = barCodePrinter

+ 144 - 31
admin-ui/src/utils/index.js

@@ -405,6 +405,93 @@ export function getUrlParam(name) {
   return null; //返回参数值
 }
 
+function addDynamicText(width, content) {
+  // 创建一个临时元素来计算文本高度
+  var tempDiv = document.createElement("div");
+  tempDiv.style.position = "absolute";
+  tempDiv.style.left = "-1000px";
+  tempDiv.style.top = "-1000px";
+  tempDiv.style.width = width + "mm"; // 使用与LODOP相同的单位
+  tempDiv.style.fontFamily = "Arial"; // 使用与打印相同的字体
+  tempDiv.style.fontSize = "14px"; // 使用与打印相同的字号
+  tempDiv.style.lineHeight = "1.2"; // 使用与打印相同的行高
+  tempDiv.innerHTML = content;
+  
+  document.body.appendChild(tempDiv);
+  var height = tempDiv.offsetHeight;
+  document.body.removeChild(tempDiv);
+  
+  // 转换为毫米(假设LODOP使用毫米为单位)
+  var heightInMM = height * 0.264583; // 1px ≈ 0.264583mm
+  return height
+}
+
+// 充值收据
+export function exchangeClothPrinter(LODOP, data, lodopName) {
+  LODOP.PRINT_INIT(`充值收据`);
+  // 设置打印模板
+  LODOP.SET_PRINT_PAGESIZE(3, 800, 45, '');
+  // 设置打印内容
+  LODOP.ADD_PRINT_TEXT(30, 95, 150, 20, `一七生活 ${data.storeName}`);
+  LODOP.ADD_PRINT_TEXT(55, 135, 50, 20, '充值单');
+   // 开始绘制虚线
+  LODOP.ADD_PRINT_LINE(80, 10, 80, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(90, 10, 200, 20, `订单号:${data.orderNo}`);
+  let date = formatDate(new Date().getTime(), 1)
+  LODOP.ADD_PRINT_TEXT(110, 10, 300, 20, `打印日期:${date}`);
+  LODOP.ADD_PRINT_LINE(130, 10, 130, 295, 1, 1);
+  let type = ''
+  if (data.rechargeType == '3') {
+    type = '自定义'
+  }
+  if (data.rechargeType == '0') {
+    type = '套餐'
+  }
+  if (data.rechargeType == '1') {
+    type = '福利金'
+  }
+  LODOP.ADD_PRINT_TEXT(140, 10, 300, 20, `充值类型:${type}`);
+  LODOP.ADD_PRINT_TEXT(160, 10, 300, 20, `充值金额:${data.rechargeAmount || 0};赠送:${data.giveAmount || 0};福利:${data.welfareAmount || 0};`);
+  LODOP.ADD_PRINT_TEXT(180, 10, 300, 20, `支付金额:${data.payAmount}`);
+  let payType = ''
+  if (data.rechargeType == '1') {
+    type = `(福利)${data.welfareAmount}`
+  }else if(data.payType == '0'){
+    payType = '微信 '
+  }else if(data.payType == '1'){
+    payType = '支付宝 '
+  }else if(data.payType == '2'){
+    payType = '现金'
+  }else if(data.payType == '9'){
+     payType = `(现金)${data.cashPayAmount} `
+    if (data.aliPayAmount) {
+      payType += `(支付宝)${data.aliPayAmount}`
+    }
+    if (data.wxPayAmount) {
+      payType += `(微信)${data.wxPayAmount}`
+    }
+  }
+  LODOP.ADD_PRINT_TEXT(200, 10, 300, 20, `支付方式:${payType}`);
+  LODOP.ADD_PRINT_TEXT(220, 10, 300, 20, `订单备注:${data.remark?data.remark:''}`);
+  LODOP.ADD_PRINT_LINE(240, 10, 240, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(250, 10, 300, 20, `会员余额:${data.memberPrice || 0}`);
+  LODOP.ADD_PRINT_TEXT(270, 10, 300, 20, `本次充值:${data.rechargeAmount + data.giveAmount + data.welfareAmount}元`);
+  LODOP.ADD_PRINT_TEXT(290, 10, 300, 20, `会员余额:${(data.memberPrice || 0) + data.rechargeAmount + data.giveAmount + data.welfareAmount}元`);
+  LODOP.ADD_PRINT_LINE(310, 10, 310, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(320, 10, 300, 20, `会员电话:${data.contactPhone || ''}`);
+  LODOP.ADD_PRINT_TEXT(340, 10, 300, 20, `会员姓名:${data.contactName || ''}`);
+  LODOP.ADD_PRINT_TEXT(360, 10, 300, 20, `会员地址:${data.contactAddress}`);
+
+  LODOP.ADD_PRINT_TEXT(400, 10, 300, 20, `联系电话:${data.sysOrg.contactPhone}`);
+  LODOP.ADD_PRINT_TEXT(420, 10, 300, 20, `本店地址:${data.sysOrg.address || ''}`);
+  LODOP.ADD_PRINT_TEXT(460, 10, 300, 20, `客户签名:`);
+  LODOP.ADD_PRINT_LINE(500, 10, 500, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(510, 50, 300, 20, `请仔细阅读店内张贴的取衣凭证注意事项`);
+  LODOP.ADD_PRINT_LINE(530, 10, 530, 295, 1, 1);
+  if (LODOP.SET_PRINTER_INDEXA(lodopName))
+  LODOP.PRINT(); //直接打印
+}
+
 //收衣明细收据
 export function collectClothPrinter(LODOP, data, lodopName) {
   // 创建Lodop打印对象
@@ -416,7 +503,7 @@ export function collectClothPrinter(LODOP, data, lodopName) {
   //这里3表示纵向打印且纸高“按内容的高度”;800表示纸宽80mm;45表示页底空白4.5mm
 
   // 设置打印内容
-  LODOP.ADD_PRINT_TEXT(30, 95, 150, 20, `一七生活 ${data.orgName}`);
+  LODOP.ADD_PRINT_TEXT(30, 95, 150, 20, `一七生活 ${data.orgName || data.sysOrg.name}`);
   LODOP.ADD_PRINT_TEXT(55, 135, 50, 20, '收衣单');
 
   // 开始绘制虚线
@@ -429,8 +516,9 @@ export function collectClothPrinter(LODOP, data, lodopName) {
   LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0);
 
   LODOP.ADD_PRINT_TEXT(200, 50, 300, 20, `收衣日期:${data.createTime?data.createTime:'--'}`);
-
-  LODOP.ADD_PRINT_TEXT(230, 50, 300, 20, `预计取衣时间:${data.planSendClothTime?data.planSendClothTime:'--'}`);
+  let planTime = data.planSendClothTime ? data.planSendClothTime : (data.planSendToUserTime || '--')
+  
+  LODOP.ADD_PRINT_TEXT(230, 50, 300, 20, `预计取衣时间:${planTime}`);
 
   LODOP.ADD_PRINT_LINE(255, 10, 255, 295, 1, 1);
 
@@ -439,6 +527,7 @@ export function collectClothPrinter(LODOP, data, lodopName) {
   LODOP.ADD_PRINT_LINE(285, 10, 285, 295, 1, 1);
 
   const top = 305;
+  let height = top
   for(var i = 0; i < data.orderClothDetails.length; i++) {
     let item = data.orderClothDetails[i];
     let _name = ''
@@ -450,16 +539,22 @@ export function collectClothPrinter(LODOP, data, lodopName) {
     item.orderClothFlaws.forEach(item_n=>{
       _flaws += item_n.clothFlawName+';'
     })
-    LODOP.ADD_PRINT_TEXT(top + i * 30, 20, 50, 20, i+1);
-    LODOP.ADD_PRINT_TEXT(top + i * 30, 45, 110, 20, _name);
-    LODOP.ADD_PRINT_TEXT(top + i * 30, 165, 40, 20, `${item.totalPrice}元`);
-    LODOP.ADD_PRINT_TEXT(top + i * 30, 200, 110, 20, _flaws);
+    LODOP.ADD_PRINT_TEXT(height, 20, 50, 20, i+1);
+    LODOP.ADD_PRINT_TEXT(height, 45, 110, 20, _name);
+    LODOP.ADD_PRINT_TEXT(height, 165, 40, 20, `${item.totalPrice}元`);
+    LODOP.ADD_PRINT_TEXT(height, 200, 110, "100%", _flaws);
+    LODOP.SET_PRINT_STYLEA(0, "Autowrap", 1);
+    let h1 = addDynamicText(30, _name)
+    let h2 = addDynamicText(30, _flaws)
+    var actualHeight = h1 > h2 ? h1 : h2
+    height += actualHeight
   }
 
-  const height = top + (data.orderClothDetails.length+1)*20;
+  // const height = top + (data.orderClothDetails.length+1)*20;
   // 合计
   LODOP.ADD_PRINT_TEXT(height + 15, 10, 150, 20, `合计:${data.orderClothDetails.length}件`);
-  LODOP.ADD_PRINT_TEXT(height + 15, 160, 150, 20, `总金额:${data.totalPrice}元`);
+  let totalPrice = data.totalPrice || data.orderAmount
+  LODOP.ADD_PRINT_TEXT(height + 15, 160, 150, 20, `总金额:${totalPrice}元`);
 
   LODOP.ADD_PRINT_LINE(height + 35, 10, height + 35, 295, 1, 1);
 
@@ -483,26 +578,34 @@ export function collectClothPrinter(LODOP, data, lodopName) {
 
   LODOP.ADD_PRINT_TEXT(height + 45, 10, 150, 20, `付款方式:${payTypename}`);
   LODOP.ADD_PRINT_TEXT(height + 45, 160, 150, 20, `会员金额:${data.memberPrice?data.memberPrice+'元':''}`);
-  LODOP.ADD_PRINT_TEXT(height + 75, 10, 150, 20, `本次扣款:${thisPrice?thisPrice+'元':''}`);
+  LODOP.ADD_PRINT_TEXT(height + 75, 10, 150, 20, `本次扣款:${thisPrice?thisPrice+'元':'0'}`);
   LODOP.ADD_PRINT_TEXT(height + 75, 160, 150, 20, `会员余额:${data.memberPrice?data.memberPrice-thisPrice?thisPrice:0 +'元':''}`);
 
-  LODOP.ADD_PRINT_TEXT(height + 105, 10, 150, 20, `客户:${data.contactName}`);
-  LODOP.ADD_PRINT_TEXT(height + 105, 160, 180, 20, `客户电话:${data.contactPhone}`);
-  LODOP.ADD_PRINT_TEXT(height + 135, 10, 300, 20, `客户地址:${data.province+data.city+data.area+data.address+data.addressDetail}`);
-
-  LODOP.ADD_PRINT_LINE(height + 160, 10, height + 160, 295, 1, 1);
-  LODOP.ADD_PRINT_TEXT(height + 170, 10, 300, 20, `本店地址:${data.sysOrg.address?data.sysOrg.address:''}${data.sysOrg.addressDetail?data.sysOrg.addressDetail:''}`);
-  LODOP.ADD_PRINT_TEXT(height + 200, 10, 300, 20, `联系电话:${data.sysOrg.contactPhone}`);
-
-  LODOP.ADD_PRINT_TEXT(height + 230, 10, 180, 20, `营业时间:${data.sysOrg.businessStartTime?data.sysOrg.businessStartTime:''}-${data.sysOrg.businessEndTime?data.sysOrg.businessEndTime:''}`);
-  LODOP.ADD_PRINT_TEXT(height + 230, 200, 120, 20, `员工:${data.createBy?data.createBy:''}`);
-
-  LODOP.ADD_PRINT_LINE(height + 255, 10, height + 255, 295, 1, 1);
-  LODOP.ADD_PRINT_TEXT(height + 265, 10, 300, 20, `订单备注:${data.remark?data.remark:''}`);
-  LODOP.ADD_PRINT_TEXT(height + 300, 10, 300, 50, `客户签名:`);
-  console.log('aaa', this.LODOP.SET_PRINTER_INDEXA(lodopName))
+  LODOP.ADD_PRINT_TEXT(height + 105, 10, 150, 20, `客户:${data.contactName || data.appUserName}`);
+  LODOP.ADD_PRINT_TEXT(height + 105, 160, 180, 20, `客户电话:${data.contactPhone || data.appUserPhoneNumber}`);
+  LODOP.ADD_PRINT_TEXT(height + 135, 10, 300, 20, `客户地址:${data.province || ''}${ data.city|| ''}${ data.area|| ''}${ data.address|| ''}${ data.addressDetail|| ''}`);
+  var userHeight = addDynamicText(90, `客户地址:${data.province || ''}${ data.city|| ''}${ data.area|| ''}${ data.address|| ''}${ data.addressDetail|| ''}`)
+  height += userHeight
+
+  LODOP.ADD_PRINT_LINE(height + 140, 10, height + 140, 295, 1, 1);
+  console.log(data.sysOrg)
+  LODOP.ADD_PRINT_TEXT(height + 150, 10, 300, 20, `本店地址:${data.sysOrg.address || ''}`);
+  var sysHeight = addDynamicText(90, `本店地址:${data.sysOrg.address || ''}`)
+  height += sysHeight
+  LODOP.ADD_PRINT_TEXT(height + 160, 10, 300, 20, `联系电话:${data.sysOrg.contactPhone}`);
+
+  // LODOP.ADD_PRINT_TEXT(height + 210, 10, 180, 20, `营业时间:${data.sysOrg.businessStartTime?data.sysOrg.businessStartTime:''}-${data.sysOrg.businessEndTime?data.sysOrg.businessEndTime:''}`);
+  // LODOP.ADD_PRINT_TEXT(height + 210, 200, 120, 20, `员工:${data.createBy?data.createBy:''}`);
+
+  LODOP.ADD_PRINT_LINE(height + 185, 10, height + 185, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 195, 10, 300, 20, `订单备注:${data.remark?data.remark:''}`);
+  var remarkHeight = addDynamicText(90, `订单备注:${data.remark?data.remark:''}`)
+  height += remarkHeight
+  LODOP.ADD_PRINT_TEXT(height + 210, 10, 300, 50, `客户签名:`);
+  LODOP.ADD_PRINT_LINE(height + 250, 10, height + 250, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 260, 50, 300, 20, `请仔细阅读店内张贴的取衣凭证注意事项`);
+  LODOP.ADD_PRINT_LINE(height + 280, 10, height + 280, 295, 1, 1);
   if (this.LODOP.SET_PRINTER_INDEXA(lodopName))
-    console.log('aaa22')
 
   // this.LODOP.PREVIEW(); //打印预览
   this.LODOP.PRINT(); //直接打印
@@ -672,13 +775,23 @@ export function barCodePrinter(LODOP, data, lodopName){
     })
     _name = item.clothItemName+_name
     let _flaws = ''
+    let n = 0
     item.orderClothFlaws.forEach(item_n=>{
-      _flaws += item_n.clothFlawTypeName+';'
+      if (n < 10) {
+        _flaws += item_n.clothFlawName+';'
+      } 
+      n++
     })
+    if (n >= 10) {
+      _flaws += '...'
+    }
     let junInfo = ''
-    item.orderClothAdjuncts.forEach(item_n=>{
-      junInfo += `${item_n.adjunctName}*${item_n.num}`+';'
-    })
+    if (item.orderClothAdjunct) {
+      item.orderClothAdjuncts.forEach(item_n=>{
+        junInfo += `${item_n.adjunctName}*${item_n.num}`+';'
+      })
+    }
+    
 
     //  绘制条码
     LODOP.ADD_PRINT_BARCODE(top + i * 110, 10, 260, 40, '128B', item.washCode);
@@ -690,7 +803,7 @@ export function barCodePrinter(LODOP, data, lodopName){
 
     LODOP.ADD_PRINT_TEXT(top + 30 + i * 110, 280, 400, 15, `附件:${junInfo}`);
     LODOP.ADD_PRINT_TEXT(top + 30 + i * 110, 650, 100, 15, `${data.id}-${i+1}`);
-    LODOP.ADD_PRINT_TEXT(top + 50 + i * 110, 280, 400, 15, `备注:${item.remark}`);
+    LODOP.ADD_PRINT_TEXT(top + 50 + i * 110, 280, 400, 15, `备注:${item.remark}  | ${item.clothSpeedName}`);
     LODOP.ADD_PRINT_TEXT(top + 50 + i * 110, 650, 100, 20, data.sysOrg.name);
   }
 

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

@@ -35,9 +35,9 @@
           <el-form-item label="头像地址" prop="avatarUrl" >
             <image-upload v-model="dataSource.avatarUrl" :limit="1" :disabled="isDisabled"/>
           </el-form-item>
-          <el-form-item label="客户等级" prop="level">
+          <!-- <el-form-item label="客户等级" prop="level">
             <el-input-number v-model="dataSource.level"  :min="1" :max="50" label="请输入客户等级" :disabled="isDisabled"></el-input-number>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="备注" prop="remark">
             <el-input v-model="dataSource.remark" placeholder="请输入备注" maxlength="50" show-word-limit />
           </el-form-item>

+ 1 - 1
admin-ui/src/views/goods/commonGoods/setSku.vue

@@ -20,7 +20,7 @@
             </el-table-column>
             <el-table-column label="零售价(元)" align="center" prop="salePrice" />
             <el-table-column label="成本价(元)" align="center" prop="costPrice"  v-if="userInfoVO.userType == '00'" />
-            <el-table-column label="采购价(元)1" align="center" prop="purchasePrice" v-if="userInfoVO.userType != '02'"/>
+            <el-table-column label="采购价(元)" align="center" prop="purchasePrice" v-if="userInfoVO.userType != '02'"/>
             <el-table-column label="库存" align="center" prop="stock" />
             <el-table-column label="启用状态" align="center" prop="status">
                 <template slot-scope="scope">

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

@@ -1509,7 +1509,7 @@ export default {
         },
 
         async handleConfirmPay() {
-            // let obj = {"isSpecial":"Y","isAppointment":"N","authCode":"","payType":"2","appUserId":"82034","orderClothItemDTOS":[{"orderClothCraftDTOS":[{"clothCraftId":7,"clothCraftName":"毛毛领","price":20,"isSelect":true}],"orderClothAdjunctDTOS":[{"adjunctId":7,"num":1,"adjunctName":"毛领"}],"orderClothTypeDTOS":[],"clothTypeKeys":[],"specialPrice":0,"clothSpeedMultiple":1,"picNum":0,"isCustomPrice":"N","remark":"","defaultPrice":0,"clothWashModeId":2,"clothWashModeName":"水洗","clothItemId":7168,"id":7168,"name":"文胸","typeId":14,"washId":2,"washName":"水洗","unit":"件","isChangePrice":"N","isCalArea":"N","isSpecial":"N","plusPrice":0,"silkPrice":0,"sheepPrice":0,"childPrice":0,"orderClothColorDTOS":[{"clothColorId":1205,"clothColorName":"银色"}],"clothBrandId":16,"clothBrandName":"耐克","orderClothFlawDTOS":[{"clothFlawId":724,"clothFlawName":"油斑油迹"}],"isHedging":"N","clothSpeedId":1,"index":0,"deductAmount":0,"totalPrice":20,"clothItemName":"文胸"}],"orderCouponDTOS":[],"payTimeType":"0","createById":"105","createBy":"storeAdmin","createTime":"2025-04-10 23:09:18","id":"349","orderNo":"CL1107846939908640768","orderType":"0","orgId":"4","sourceType":"02","factoryId":"1","contactName":"赵策","contactPhone":"13312341234","orderAmount":20,"orderClothPrice":20,"orderClothCount":1,"payAmount":20,"payStatus":"0","orderSource":"OFFLINE","orderStatus":"4","setPriceTime":"2025-04-10 23:09:18","planSendToUserTime":"2025-04-15 23:09:18","takeClothWay":"0","cashDeductAmount":0,"clothSpeedId":"1","clothSpeedName":"普洗","deliveryAmount":0}
+            // let obj = {"isSpecial":"Y","isAppointment":"N","authCode":"","payType":"2","appUserId":"82034","orderClothItemDTOS":[{"orderClothCraftDTOS":[{"clothCraftId":7,"clothCraftName":"毛毛领","price":20,"isSelect":true}],"orderClothAdjunctDTOS":[{"adjunctId":7,"num":1,"adjunctName":"毛领"}],"orderClothTypeDTOS":[],"clothTypeKeys":[],"specialPrice":0,"clothSpeedMultiple":1,"picNum":0,"isCustomPrice":"N","remark":"","defaultPrice":0,"clothWashModeId":2,"clothWashModeName":"水洗","clothItemId":7168,"id":7168,"name":"文胸","typeId":14,"washId":2,"washName":"水洗","unit":"件","isChangePrice":"N","isCalArea":"N","isSpecial":"N","plusPrice":0,"silkPrice":0,"sheepPrice":0,"childPrice":0,"orderClothColorDTOS":[{"clothColorId":1205,"clothColorName":"银色"}],"clothBrandId":16,"clothBrandName":"耐克","orderClothFlawDTOS":[{"clothFlawId":724,"clothFlawName":"油斑油迹"}],"isHedging":"N","clothSpeedId":1,"index":0,"deductAmount":0,"totalPrice":20,"clothItemName":"文胸"}],"orderCouponDTOS":[],"payTimeType":"0","createById":"105","createBy":"storeAdmin","createTime":"2025-04-10 23:09:18","id":"12","orderNo":"CL1107846939908640768","orderType":"0","orgId":"4","sourceType":"02","factoryId":"1","contactName":"赵策","contactPhone":"13312341234","orderAmount":20,"orderClothPrice":20,"orderClothCount":1,"payAmount":20,"payStatus":"0","orderSource":"OFFLINE","orderStatus":"4","setPriceTime":"2025-04-10 23:09:18","planSendToUserTime":"2025-04-15 23:09:18","takeClothWay":"0","cashDeductAmount":0,"clothSpeedId":"1","clothSpeedName":"普洗","deliveryAmount":0}
             // this.$refs.payStatusPopup.open(1, obj, this.appUserInfo);
             // return
             if (this.orderClothItemDTOS.length == 0) {

+ 11 - 10
admin-ui/src/views/order/cloth/orderList.vue

@@ -494,17 +494,17 @@ export default {
                 .catch(() => {})
         },
         btn_lodop(row) {
-            if (this.userInfoVO.userType == '02') {
-                const obj = {
-                    name: this.userInfoVO.storeName,
-                    contactPhone: this.userInfoVO.phonenumber,
-                    user: this.userInfoVO.nickName
-                }
-                row.sysOrg = obj
-            }
+            // if (this.userInfoVO.userType == '02') {
+            //     const obj = {
+            //         name: this.userInfoVO.storeName,
+            //         contactPhone: this.userInfoVO.phonenumber,
+            //         user: this.userInfoVO.nickName,
+            //     }
+            //     row.sysOrg = obj
+            // }
 
             this.pointerInfo = row
-            console.log()
+            console.log(row)
             const _ = this
             listOrderClothItem({ pageSize: 99999, pageNum: 1, orderNo: row.orderNo }).then((res) => {
                 console.log("AAAAA", res)
@@ -531,7 +531,8 @@ export default {
             // console.log(this.pointerList, p_name)
 
             if (type == 0) {
-                this.laundryPrinter(this.LODOP, this.pointerInfo, p_name)
+                this.collectClothPrinter(this.LODOP, this.pointerInfo, p_name)
+                // this.laundryPrinter(this.LODOP, this.pointerInfo, p_name)
             } else {
                 this.barCodePrinter(this.LODOP, this.pointerInfo, p_name)
             }

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

@@ -129,7 +129,7 @@
                 <template slot-scope="scope">
                     <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">详情</el-button>
                     <el-button type="text" icon="el-icon-camera" @click="handphotograph(scope.row)">拍照</el-button>
-                    <el-button type="text" icon="el-icon-printer" v-if="userInfoVO.userType != '00'" @click="btn_pointer_label(scope.row)">标签打印</el-button>
+                    <el-button type="text" icon="el-icon-printer" v-if="userInfoVO.userType == '02'" @click="btn_pointer_label(scope.row)">标签打印</el-button>
                 </template>
             </el-table-column>
         </Page>

+ 2 - 2
admin-ui/src/views/systemSet/purchaseGoods/platform.vue

@@ -105,7 +105,7 @@
                                         />
                                     </template>
                                 </el-table-column>
-                              <el-table-column label="批发价格" align="center" width="120">
+                              <el-table-column label="采购价格" align="center" width="120">
                                 <template slot-scope="scope">
                                   <el-input
                                     v-if="scope.row.goodsSkuStoreId == vo.goodsSkuStoreId"
@@ -154,7 +154,7 @@
                                         {{formatSpec(scope.row.specValLists)}}
                                     </template>
                                 </el-table-column>
-                                <el-table-column label="批发价格" align="center" prop="costPrice" width="100" />
+                                <el-table-column label="采购价格" align="center" prop="costPrice" width="100" />
                                 <el-table-column label="库存" align="center" width="120">
                                     <template slot-scope="scope">
                                         <span :class="{'low-stock': scope.row.stock <= 5}">{{ scope.row.stock }}</span>

+ 1 - 1
admin-ui/src/views/systemSet/sellGoods/retailStore.vue

@@ -35,7 +35,7 @@
       <el-table-column label="订单编号" align="center" prop="orderNo" width="250px" />
       <el-table-column label="门店名称" align="center" prop="orgName" width="150px" v-if="userInfoVO.userType == '01'" />
       <el-table-column label="门店名称" align="center" prop="orgName" width="150px" v-if="userInfoVO.userType == '00'" />
-      <el-table-column label="进货总价(元)" align="center" prop="costTotalPrice" width="120px" />
+      <el-table-column label="批发总价(元)" align="center" prop="costTotalPrice" width="120px" />
       <el-table-column label="订单状态" align="center" prop="orderStatus" width="150px">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.purchase_order_status" :value="scope.row.orderStatus" />

+ 70 - 8
admin-ui/src/views/workbench/workRecharge/index.vue

@@ -305,9 +305,9 @@
                         <el-form-item label="头像地址" prop="avatarUrl">
                             <image-upload v-model="form.avatarUrl" :limit="1" />
                         </el-form-item>
-                        <el-form-item label="客户等级" prop="level">
+                        <!-- <el-form-item label="客户等级" prop="level">
                             <el-input-number v-model="form.level" :min="1" :max="50" label="请输入客户等级"></el-input-number>
-                        </el-form-item>
+                        </el-form-item> -->
                         <el-form-item label="备注" prop="remark">
                             <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" show-word-limit />
                         </el-form-item>
@@ -320,16 +320,17 @@
                 <el-button @click="cancel">取 消</el-button>
             </div>
         </el-dialog>
-        <pay-status-popup ref="payStatusPopup" hidePointer hideUser @paySuccess="checkIsAllPay"></pay-status-popup>
+        <pay-status-popup ref="payStatusPopup" hideUser isRecharge @paySuccess="checkIsAllPay" @pointer="setPointer"></pay-status-popup>
     </div>
 </template>
 
 <script>
 import { listType } from '@/api/recharge/type'
 import { addUser, findUserByPhoneNumber, getMemberCouponInfoByRecharge, updateUser } from '@/api/app/user'
-import { addOrder, getOrderIsAllPayByOrderNo, getOrderStatusByOrderNo, morePay } from '@/api/recharge/order'
+import { addOrder, getOrderIsAllPayByOrderNo, getOrderStatusByOrderNo, morePay, getOrder } from '@/api/recharge/order'
 import { getRechargeTypeRelationActivityInfo } from '@/api/activity/rechargeItem'
 import payStatusPopup from '@/components/payStatusPopup'
+import { getLodop } from '@/utils/lodopUtils'
 
 export default {
     name: 'workRecharge',
@@ -474,13 +475,32 @@ export default {
                 { label: '微信/支付宝', value: '0', icon: 'el-icon-mobile-phone' },
                 { label: '组合支付', value: '9', icon: 'el-icon-wallet' }
             ],
-            quickAmounts: ['100', '200', '500', '1000']
+            quickAmounts: ['100', '200', '500', '1000'],
+            LODOP: null,
+            number: 1,
+            pointerList: [],
         }
     },
     created() {
         this.handleUser()
         this.getRechargeList()
     },
+    // mounted() {
+    //     this.number = 1
+    //     const printerTime = setInterval(() => {
+    //         this.LODOP = getLodop()
+    //         console.log(this.LODOP )
+    //         this.number++
+    //         if (this.number == 25) {
+    //             clearInterval(printerTime)
+    //         }
+    //         if (this.LODOP) {
+    //             clearInterval(printerTime)
+    //         }
+    //     }, 200)
+
+    //     this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
+    // },
     computed: {
         getRechargeTypeInfo() {
             if (this.rechargeFrom.rechargeMealId != null) {
@@ -617,6 +637,8 @@ export default {
         },
         // 收银
         submitCash() {
+            // this.setPrinter(6)
+            // return 
             if (this.appUserInfo == null) {
                 this.$message.error('请选择客户')
                 return
@@ -701,6 +723,44 @@ export default {
             this.openRecharge = true
             this.orderNo = null
         },
+        setPointer(data) {
+            // if (!data.LODOP) {
+            //     this.$modal.msgError('请安装打印机软件')
+            //     return
+            // }
+
+            // let p_name = ''
+
+            // this.pointerList.forEach((pointer) => {
+            //     console.log(pointer)
+            //     if (pointer.printType == 0) {
+            //         p_name = pointer.printName
+            //     }
+            // })
+
+            let sysOrg = {}
+            if (this.userInfoVO.userType == '02') {
+                sysOrg = {
+                    name: this.userInfoVO.storeName,
+                    contactPhone: this.userInfoVO.phonenumber,
+                    user: this.userInfoVO.nickName,
+                }
+            }
+
+            getOrder(data.id).then((response) => {
+                response.data.sysOrg = sysOrg
+                response.data.contactPhone = data.appUserInfo.phoneNumber
+                response.data.contactName = data.appUserInfo.realName
+                response.data.contactAddress = ''
+                if (data.appUserInfo.defaultAddress) {
+                    let defaultAddress = data.appUserInfo.defaultAddress
+                    response.data.contactAddress = `${defaultAddress.province || ''}${ defaultAddress.city|| ''}${ defaultAddress.area|| ''}${ defaultAddress.address|| ''}${ defaultAddress.addressDetail|| ''}`
+                }
+                this.exchangeClothPrinter(data.LODOP, response.data, data.p_name)
+
+            })
+
+        },
         // 结算
         submitSettlement() {
             const orderRechargePayDTO = {
@@ -777,7 +837,7 @@ export default {
                                 }, 4000)
                             }
                             if (response.data.payResult == 200) {
-                                this.$refs.payStatusPopup.open(1, response.data)
+                                this.$refs.payStatusPopup.open(1, response.data, this.appUserInfo)
                                 this.checkIsAllPay(this.orderNo)
                             }
                             if (response.data.payResult == 101 || response.data.payResult == 0) {
@@ -802,7 +862,7 @@ export default {
                         clearInterval(intervalId)
                         return
                     }
-                    this.$refs.payStatusPopup.open(1, response.data)
+                    this.$refs.payStatusPopup.open(1, response.data, this.appUserInfo)
                     this.checkIsAllPay(this.orderNo)
                     clearInterval(intervalId)
                 })
@@ -840,6 +900,7 @@ export default {
             this.payFrom.thisPayMoney = null
             this.payFrom.aliPayBarcode = null
             this.payFrom.wxBarcode = null
+            this.payFrom.cashPayAmount = ''
         },
         // 取消按钮
         cancel() {
@@ -877,7 +938,8 @@ export default {
                 wxBarcode: null,
                 aliPayBarcode: null,
                 thisPayMoney: 0,
-                isUsedCoupon: false
+                isUsedCoupon: false,
+                cashPayAmount: ''
             }
             this.alreadyPayInfo = {
                 alreadyPayWX: 0,