|
@@ -211,16 +211,31 @@
|
|
|
<view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com big blue" style="margin-right:45upx;margin-left:55upx;">入库和改价</view>
|
|
<view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com big blue" style="margin-right:45upx;margin-left:55upx;">入库和改价</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
+ <modal-module :show="printLabelShow" @click="dialogInputConfirm" :maskClosable="true" title="数量" padding="30rpx 30rpx" >
|
|
|
|
|
+ <template v-slot:content>
|
|
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
|
|
+ <div class="inp-list-line">
|
|
|
|
|
+ <div class="line-input">
|
|
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" v-model="printNum" :adjust-position="false" class="inp-input" @focus="printNum=''" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </modal-module>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import { getPurchaseDetailApi,updateRemark,printAll,printItem,confirmPutIn,cancelPutIn } from "@/api/purchase";
|
|
import { getPurchaseDetailApi,updateRemark,printAll,printItem,confirmPutIn,cancelPutIn } from "@/api/purchase";
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
|
|
+import { print } from '@/api/product';
|
|
|
export default {
|
|
export default {
|
|
|
name: "info",
|
|
name: "info",
|
|
|
components: {
|
|
components: {
|
|
|
- TuiListCell
|
|
|
|
|
|
|
+ TuiListCell,
|
|
|
|
|
+ ModalModule
|
|
|
},
|
|
},
|
|
|
mixins: [productMins],
|
|
mixins: [productMins],
|
|
|
data() {
|
|
data() {
|
|
@@ -232,7 +247,11 @@ export default {
|
|
|
name: ""
|
|
name: ""
|
|
|
},
|
|
},
|
|
|
detailInfo: {},
|
|
detailInfo: {},
|
|
|
- loading: false
|
|
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ printItemId:0,
|
|
|
|
|
+ printType:0,
|
|
|
|
|
+ printLabelShow:false,
|
|
|
|
|
+ printNum:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -241,6 +260,43 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ dialogInputConfirm(val) {
|
|
|
|
|
+ let that=this;
|
|
|
|
|
+ if (val.index == 0) {
|
|
|
|
|
+ that.printLabelShow = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ let currentNum = this.printNum
|
|
|
|
|
+ let itemId = this.printItemId
|
|
|
|
|
+ if (currentNum == null) {
|
|
|
|
|
+ that.$msg('请填写数量')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (currentNum <= 0) {
|
|
|
|
|
+ that.$msg('数量不能小于1')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (itemId == 0) {
|
|
|
|
|
+ that.$msg('打印的花材id出错')
|
|
|
|
|
+ that.printLabelShow = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ print({id:itemId,num:currentNum,type:this.printType}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.printLabelShow = false
|
|
|
|
|
+ uni.showToast({ title: '操作成功', duration: 1500 })
|
|
|
|
|
+ } else if(res.code == 0){
|
|
|
|
|
+ that.printLabelShow = false
|
|
|
|
|
+ that.$msg(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ printLabel(item,type){
|
|
|
|
|
+ this.printType = type
|
|
|
|
|
+ this.printItemId = item.itemId
|
|
|
|
|
+ this.printLabelShow = true
|
|
|
|
|
+ this.printNum = item.itemNum
|
|
|
|
|
+ },
|
|
|
changePrice(){
|
|
changePrice(){
|
|
|
this.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+this.detailInfo.orderSn+"&id="+this.detailInfo.id+"&status="+this.detailInfo.status})
|
|
this.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+this.detailInfo.orderSn+"&id="+this.detailInfo.id+"&status="+this.detailInfo.status})
|
|
|
},
|
|
},
|
|
@@ -273,16 +329,6 @@ export default {
|
|
|
goRefund(info){
|
|
goRefund(info){
|
|
|
this.$util.pageTo({url:'/pagesPurchase/refund?orderSn='+info.orderSn})
|
|
this.$util.pageTo({url:'/pagesPurchase/refund?orderSn='+info.orderSn})
|
|
|
},
|
|
},
|
|
|
- printLabel(item,type){
|
|
|
|
|
- let that = this
|
|
|
|
|
- that.$util.confirmModal({content:'确认打印'},() => {
|
|
|
|
|
- printItem({id:item.id,type:type}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.$msg(res.msg)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
printAllLabel(item,type){
|
|
printAllLabel(item,type){
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认打印'},() => {
|
|
that.$util.confirmModal({content:'确认打印'},() => {
|