shish 4 лет назад
Родитель
Сommit
1e27075250

+ 2 - 3
hdApp/src/admin/goodsManage/add.vue

@@ -211,7 +211,6 @@ export default {
         this.$msg("请选择花材");
         return false;
       }
-
       const product = this.selectList.map(ele => {
         let unitName = ele.bigUnit
         let unitType = 0
@@ -220,10 +219,10 @@ export default {
         if(Number(ele.smallCount)>0){
           unitType = 1
           unitName = ele.smallUnit
-          num=ele.smallCount
+          num=Number(ele.smallCount)
           count = (ele.smallCount/ele.ratio).toFixed(2)
         }
-	      return { id: ele.id, ptItemId:ele.itemId,bigName:ele.bigUnit,smallName:ele.smallUnit,unitName:unitName,cover:ele.shortCover,ratio:ele.ratio,num:num,count:count}
+	      return { id: ele.id, unitType:unitType,ptItemId:ele.itemId,bigName:ele.bigUnit,smallName:ele.smallUnit,unitName:unitName,cover:ele.shortCover,ratio:ele.ratio,num:num,count:count}
       })
       that.$util.confirmModal({content:'确认添加?'},() => {
         uni.showLoading({mask:true})

+ 1 - 1
hdApp/src/admin/goodsManage/detail.vue

@@ -109,7 +109,7 @@
             </view>
             <view class="commodity-list">
               <view v-for="(s, idx) in goodsInfo.goodsItem" :key="idx" class="commodity-item" >
-                <image class="item-icon" :src="s.smallCover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
+                <image class="item-icon" :src="s.smallCover" @click="pageTo({url:'/admin/item/detail',query:{id: s.itemId}})" />
                 <view class="item-info">
                   <view class="info-line">
                     <text class="item-name">{{ s.name }}</text>

+ 4 - 7
hdApp/src/admin/work/add.vue

@@ -5,7 +5,7 @@
 
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">名称</view>
-          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写名称" maxlength="50" type="text" />
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" @focus="form.name=''" placeholder="请填写名称" maxlength="50" type="text" />
           <button class="admin-button-com big blue" style="width:190upx;" @click="selectMake()">选款式</button>
         </tui-list-cell>
 
@@ -24,11 +24,8 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :arrow="true">
-          <view class="tui-title">支数</view>
-          <picker mode="selector" :range="flowerNumList" range-key="name" @change="flowerNumChange" class="tui-input">
-            <view v-if="form.flowerNum" style="height:45upx;" >{{flowerNumName}}</view>
-            <view class="tui-placeholder" style="height:45upx;" v-else>请选择</view>
-          </picker>
+          <view class="tui-title">主花支数</view>
+          <input v-model="form.flowerNum" placeholder-class="phcolor" class="tui-input" name="flowerNum" @focus="form.flowerNum=''" placeholder="请填写主花支数" maxlength="50" type="number" />
         </tui-list-cell>
 
       </view>
@@ -84,7 +81,7 @@ export default {
         cover:[],
         num:'',
         remark:'',
-        flowerNum:0
+        flowerNum:''
       },
       flowerNumList:[{num:6,name:6},{num:9,name:9},{num:11,name:11},{num:19,name:19},{num:33,name:33},{num:52,name:52},{num:66,name:66},{num:99,name:99}],
       categorySelectedData:{},

+ 1 - 0
hdPad/src/mixins/product.js

@@ -180,6 +180,7 @@ export default {
 					list[index].currentNum = item.currentNum
 					list[index].unitPrice = item.unitPrice
 					list[index].unitType = item.unitType
+					list[index].unitName = item.unitName
 				}
 			}
 			//数据放到仓库永久存放

+ 8 - 1
hdPad/src/pages/home/components/createWork.vue

@@ -39,13 +39,17 @@
         </view>
         <view class="footer">
             <button @click="cancelCreate()">取消</button>
-            <button @click="confirmCreate()">确认</button>
+            <button @click="confirmAdd()">确认</button>
         </view>
 
         <uni-popup ref="getPrintRef" type="dialog">
             <uni-popup-dialog type="info" cancelText="取消" confirmText="好的" title="提示" content="您还没有连接标签机,请先连接" @confirm="confirmGetPrint"></uni-popup-dialog>
         </uni-popup>
 
+        <uni-popup ref="confirmCreateRef" type="dialog">
+            <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认提交?" @confirm="confirmCreate"></uni-popup-dialog>
+        </uni-popup>
+
     </view>
 </template>
 <script>
@@ -138,6 +142,9 @@ export default {
                 //console.log(ret)
             })
         },
+        confirmAdd(){
+            this.$refs.confirmCreateRef.open('center')
+        },
         confirmCreate(){
             let that = this
             this.$innerAudioContext.play()

+ 2 - 1
hdPad/src/pages/home/components/selectNum.vue

@@ -6,7 +6,7 @@
 
             <view class="flower-open_box">
                 <view @tap="checkCurrent(0)">
-                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigUnit : customData.smallUnit}}</view>
+                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigUnit : customData.smallUnit}}</view>
                     <view class="desc" v-else>数量</view>
                     <div class="flower-unit_box">
                         <text :class="{selected:checkType == 0}">{{currentNum}}</text>
@@ -141,6 +141,7 @@ export default {
             this.$emit('confirmAddItemModel', this.customData)
             this.checkType = 0
             this.fillType = 0
+            this.unitType = 0
         },
         changeUnitType(){
             this.unitType = this.unitType == 0 ? 1 : 0

+ 2 - 1
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -6,7 +6,7 @@
 
             <view class="flower-open_box">
                 <view @tap="checkCurrent(0)">
-                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigUnit : customData.smallUnit}}</view>
+                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigUnit : customData.smallUnit}}</view>
                     <view class="desc" v-else>数量</view>
                     <div class="flower-unit_box">
                         <text :class="{selected:checkType == 0}">{{currentNum}}</text>
@@ -151,6 +151,7 @@ export default {
             this.$emit('confirmAddItemModel', this.customData)
             this.checkType = 0
             this.fillType = 0
+            this.unitType = 0
         },
         changeUnitType(){
             this.unitType = this.unitType == 0 ? 1 : 0

+ 1 - 1
hdPad/src/pages/home/components/wastageSelectNum.vue

@@ -6,7 +6,7 @@
 
             <view class="flower-open_box">
                 <view @tap="checkCurrent(0)">
-                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigName : customData.smallName}}</view>
+                    <view class="desc" v-if="customData.property && customData.property==1">{{Number(unitType) == 0 ? customData.bigName : customData.smallName}}</view>
                     <view class="desc" v-else>数量</view>
                     <div class="flower-unit_box">
                         <text :class="{selected:checkType == 0}">{{currentNum}}</text>

+ 5 - 19
hdPad/src/pages/home/components/workInfo.vue

@@ -23,7 +23,7 @@
     </view>
     <view class="work-item-detail">
 
-      <view class="flex-space right-detail-title">单位用材</view>
+      <view class="flex-space right-detail-title">每份用材</view>
       
       <view class="unit-use-item">
         <view class="commodity-list">
@@ -42,18 +42,11 @@
             </view>
           </view>
         </view>
-        <view class="summary-bar">
-          <view class="operate-view" ></view>
-          <view class="describe-view">
-            <text v-if="Number(unitUseItem.bigNum)>0">{{unitUseItem.bigNum}}扎</text>
-            <text v-if="Number(unitUseItem.smallNum)>0">{{unitUseItem.smallNum}}支</text>
-          </view>
-        </view>
       </view>
 
       <view style="height:2vh;background-color:#EEEEEE;"></view>
 
-      <view class="flex-space right-detail-title"> 累计用材 </view>
+      <view class="flex-space right-detail-title"> 总共用材 </view>
       
       <view class="total-use-item">
         <view class="commodity-list">
@@ -74,20 +67,13 @@
             </view>
           </view>
         </view>
-        <view class="summary-bar">
-          <view class="operate-view" ></view>
-          <view class="describe-view">
-            <text v-if="Number(totalUseItem.bigNum)>0">{{totalUseItem.bigNum}}扎</text>
-            <text v-if="Number(totalUseItem.smallNum)>0">{{totalUseItem.smallNum}}支</text>
-          </view>
-        </view>
       </view>
     </view>
 
     <view class="button-area">
-      <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
-      <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
       <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
+      <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
+      <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
       <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn(orderInfo)">打印</view>
       <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</view>
     </view>
@@ -99,7 +85,7 @@
     </uni-popup>
 
     <uni-popup ref="cancelWorkRef" type="dialog">
-        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消?" @confirm="confirmCancel"></uni-popup-dialog>
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消工单?" @confirm="confirmCancel"></uni-popup-dialog>
     </uni-popup>
 
     <uni-popup ref="lockWorkRef" type="dialog">

+ 5 - 5
hdPad/src/pages/home/modify.vue

@@ -13,9 +13,9 @@
             <!-- 按钮操作 -->
             <view class="open-box">
 				<view class="button-area">
-					<view class="active" @click="cancel">取消</view>
-					<view class="active" @click="confirmModify">确认</view>
 					<view class="active" @click="clearItemFn">清空</view>
+					<view class="active" @click="confirmModify">确认</view>
+					<view class="active" @click="cancel">取消</view>
 				</view>
             </view>
 			<!-- 清空 -->
@@ -69,8 +69,8 @@ export default {
 				this.$msg('请选择花材')
 				return false
 			}
-			const product = this.selectList.map(e => { 
-				return { productId: e.id, unitType:e.unitType,num:e.currentNum}
+			const product = this.selectList.map(e => {
+				return { productId: e.id, unitType:e.unitType,num:e.currentNum,unitPrice:e.unitPrice}
 			})
 			modifyItem({product:JSON.stringify(product),id:this.option.id}).then(res=>{
 				if(res.code == 1){
@@ -93,7 +93,7 @@ export default {
 				if(res.code == 1){
 					if(res.data.item && !this.$util.isEmpty(res.data.item)){
 						const newItem = res.data.item.map(ele=>{
-							return {property:1,name:ele.name,unitType:ele.unitType,unitPrice:ele.unitPrice,unitName:ele.unitName,currentNum:ele.num,id:ele.id}
+							return {property:1,name:ele.name,unitType:ele.unitType,unitPrice:ele.unitPrice,unitName:ele.unitName,currentNum:ele.num,id:ele.itemId}
 						})
 						this.setSelectInfo({ currentJobType: this.currentJobType, info: newItem,currentJobId:this.currentJobId })
 					}