niexiting 11 months ago
parent
commit
0c7f94dde3
  1. 2
      api/httpRequest3.js
  2. 4
      api/index.js
  3. 117
      api/request2.js
  4. 23
      common/directory.js
  5. 105
      components/pullDown/pullDown.vue
  6. 5
      mycomponents/location/requiredLocation.vue
  7. 47
      mycomponents/qty/CountQtyEdit.vue
  8. 16
      mycomponents/qty/compareQty.vue
  9. 117
      mycomponents/recommend/recommendCount.vue
  10. 4
      package-lock.json
  11. 12
      pages.json
  12. 115
      pages/config/config.vue
  13. 6
      pages/count/coms/comCountDetailCard.vue
  14. 17
      pages/count/coms/comCountJobCard.vue
  15. 23
      pages/count/coms/jobInfoPopup.vue
  16. 276
      pages/count/job/countDetail.vue
  17. 2
      pages/index/index.vue
  18. 118
      pages/inspect/coms/inspectEdit.vue
  19. 6
      pages/inspect/coms/uploadCamera.vue
  20. 30
      pages/inspect/job/inspectDetail.vue
  21. 27
      pages/inspect/job/inspectFullDetail.vue
  22. 4
      pages/productionReturn/coms/comReturnRequestCreator.vue
  23. 2
      pages/productionReturn/request/returnRequestCreate.vue
  24. 2
      pages/purchaseReceipt/coms/comReceiptDetailCard.vue
  25. 2
      static/config.json
  26. 4
      test/pullDownTest.vue
  27. 2
      test/pullDownTest2.vue

2
api/httpRequest3.js

@ -53,4 +53,6 @@ function service(options = {}) {
});
}
export default service;

4
api/index.js

@ -1226,3 +1226,7 @@ export const issueDirect = (params) => request(
data: params,
method: "post"
});

117
api/request2.js

@ -1,4 +1,5 @@
import request from '@/api/httpRequest3.js'
import storage from '@/common/utils/storage'
// const baseApi = "/api/admin-api"
//公司地址
// 本地地址
@ -624,7 +625,7 @@ export function getPurchaseReturnRequestDetail(id) {
*/
export function purchaseReturnRequestClose(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/close?id="+id,
url: baseApi + "/wms/purchasereturn-request-main/close?id=" + id,
method: "put",
data: {},
});
@ -636,7 +637,7 @@ export function purchaseReturnRequestClose(id) {
*/
export function purchaseReturnRequestApprove(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit?id="+id,
url: baseApi + "/wms/purchasereturn-request-main/submit?id=" + id,
method: "put",
data: {},
});
@ -648,7 +649,7 @@ export function purchaseReturnRequestApprove(id) {
*/
export function purchaseReturnRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/agree?id="+id,
url: baseApi + "/wms/purchasereturn-request-main/agree?id=" + id,
method: "put",
data: {},
});
@ -660,7 +661,7 @@ export function purchaseReturnRequestApproveAgree(id) {
*/
export function purchaseReturnRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/refused?id="+id,
url: baseApi + "/wms/purchasereturn-request-main/refused?id=" + id,
method: "put",
data: {},
});
@ -672,7 +673,7 @@ export function purchaseReturnRequestApproveRefused(id) {
*/
export function purchaseReturnRequestHandle(id) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/handle?id="+id,
url: baseApi + "/wms/purchasereturn-request-main/handle?id=" + id,
method: "put",
data: {},
});
@ -1163,39 +1164,39 @@ export function getCountJobDetail(id) {
}
/**
* 盘点 任务承接
* 盘点任务 任务承接
* @param {*} id
*
*/
export function takeCountJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
url: baseApi + "/wms/count-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 盘点 放弃承接
* 盘点任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeCountJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/count-job-main/abandon?id=" + id,
method: "put",
data: {},
});
}
/**
* 盘点 任务提交
* 盘点任务 提交
* @param {*} 任务id
*
*/
export function countJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
url: baseApi + "/wms/count-job-main/execute",
method: "put",
data: params,
});
@ -1287,7 +1288,7 @@ export function unPlannedReceiptRequestCreate(params) {
*/
export function unPlannedReceiptRequestApprove(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/submit?id="+id,
url: baseApi + "/wms/unplannedreceipt-request-main/submit?id=" + id,
method: "put",
data: {},
});
@ -1299,7 +1300,7 @@ export function unPlannedReceiptRequestApprove(id) {
*/
export function unPlannedReceiptRequestClose(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/close?id="+id,
url: baseApi + "/wms/unplannedreceipt-request-main/close?id=" + id,
method: "put",
data: {},
});
@ -1311,7 +1312,7 @@ export function unPlannedReceiptRequestClose(id) {
*/
export function unPlannedReceiptRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/agree?id="+id,
url: baseApi + "/wms/unplannedreceipt-request-main/agree?id=" + id,
method: "put",
data: {},
});
@ -1323,7 +1324,7 @@ export function unPlannedReceiptRequestApproveAgree(id) {
*/
export function unPlannedReceiptRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/refused?id="+id,
url: baseApi + "/wms/unplannedreceipt-request-main/refused?id=" + id,
method: "put",
data: {},
});
@ -1335,7 +1336,7 @@ export function unPlannedReceiptRequestApproveRefused(id) {
*/
export function unPlannedReceiptRequestHandle(id) {
return request({
url: baseApi + "/wms/unplannedreceipt-request-main/handle?id="+id,
url: baseApi + "/wms/unplannedreceipt-request-main/handle?id=" + id,
method: "put",
data: {},
});
@ -1440,7 +1441,7 @@ export function unPlannedIssueRequestCreate(params) {
*/
export function unPlannedIssueRequestApprove(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/submit?id="+id,
url: baseApi + "/wms/unplannedissue-request-main/submit?id=" + id,
method: "put",
data: {},
});
@ -1452,7 +1453,7 @@ export function unPlannedIssueRequestApprove(id) {
*/
export function unPlannedIssueRequestClose(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/close?id="+id,
url: baseApi + "/wms/unplannedissue-request-main/close?id=" + id,
method: "put",
data: {},
});
@ -1464,7 +1465,7 @@ export function unPlannedIssueRequestClose(id) {
*/
export function unPlannedIssueRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/agree?id="+id,
url: baseApi + "/wms/unplannedissue-request-main/agree?id=" + id,
method: "put",
data: {},
});
@ -1476,7 +1477,7 @@ export function unPlannedIssueRequestApproveAgree(id) {
*/
export function unPlannedIssueRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/refused?id="+id,
url: baseApi + "/wms/unplannedissue-request-main/refused?id=" + id,
method: "put",
data: {},
});
@ -1488,7 +1489,7 @@ export function unPlannedIssueRequestApproveRefused(id) {
*/
export function unPlannedIssueRequestHandle(id) {
return request({
url: baseApi + "/wms/unplannedissue-request-main/handle?id="+id,
url: baseApi + "/wms/unplannedissue-request-main/handle?id=" + id,
method: "put",
data: {},
});
@ -2251,7 +2252,7 @@ export function issueRequestSubmit(params) {
*/
export function issueRequestHandle(id) {
return request({
url: baseApi + "/wms/issue-request-main/handle?id="+id,
url: baseApi + "/wms/issue-request-main/handle?id=" + id,
method: "put",
data: {},
});
@ -2264,7 +2265,7 @@ export function issueRequestHandle(id) {
*/
export function issueRequestSubmitApprove(id) {
return request({
url: baseApi + "/wms/issue-request-main/submit?id="+id,
url: baseApi + "/wms/issue-request-main/submit?id=" + id,
method: "put",
data: {},
});
@ -2276,7 +2277,7 @@ export function issueRequestSubmitApprove(id) {
*/
export function issueRequestSubmitApproveAgree(id) {
return request({
url: baseApi + "/wms/issue-request-main/agree?id="+id,
url: baseApi + "/wms/issue-request-main/agree?id=" + id,
method: "put",
data: {},
});
@ -2288,7 +2289,7 @@ export function issueRequestSubmitApproveAgree(id) {
*/
export function issueRequestSubmitApproveRefused(id) {
return request({
url: baseApi + "/wms/issue-request-main/refused?id="+id,
url: baseApi + "/wms/issue-request-main/refused?id=" + id,
method: "put",
data: {},
});
@ -2300,7 +2301,7 @@ export function issueRequestSubmitApproveRefused(id) {
*/
export function issueRequestClose(id) {
return request({
url: baseApi + "/wms/issue-request-main/close?id="+id,
url: baseApi + "/wms/issue-request-main/close?id=" + id,
method: "put",
data: {},
});
@ -2699,7 +2700,7 @@ export function scrapRequestCreate(params) {
*/
export function scrapRequestApprove(id) {
return request({
url: baseApi + "/wms/scrap-request-main/submit?id="+id,
url: baseApi + "/wms/scrap-request-main/submit?id=" + id,
method: "put",
data: {},
});
@ -2711,7 +2712,7 @@ export function scrapRequestApprove(id) {
*/
export function scrapRequestClose(id) {
return request({
url: baseApi + "/wms/scrap-request-main/close?id="+id,
url: baseApi + "/wms/scrap-request-main/close?id=" + id,
method: "put",
data: {},
});
@ -2723,7 +2724,7 @@ export function scrapRequestClose(id) {
*/
export function scrapRequestApproveAgree(id) {
return request({
url: baseApi + "/wms/scrap-request-main/agree?id="+id,
url: baseApi + "/wms/scrap-request-main/agree?id=" + id,
method: "put",
data: {},
});
@ -2735,7 +2736,7 @@ export function scrapRequestApproveAgree(id) {
*/
export function scrapRequestApproveRefused(id) {
return request({
url: baseApi + "/wms/scrap-request-main/refused?id="+id,
url: baseApi + "/wms/scrap-request-main/refused?id=" + id,
method: "put",
data: {},
});
@ -2747,7 +2748,7 @@ export function scrapRequestApproveRefused(id) {
*/
export function scrapRequestHandle(id) {
return request({
url: baseApi + "/wms/scrap-request-main/handle?id="+id,
url: baseApi + "/wms/scrap-request-main/handle?id=" + id,
method: "put",
data: {},
});
@ -2951,3 +2952,57 @@ export function getBalanceByFilter(param) {
data: param,
});
}
/**
* 删除文件
* @param {*}
*
*/
export function deleteFileById(id) {
return request({
url: baseApi + "/infra/file/delete?id=" + id ,
method: "delete",
data: {},
});
}
/**
* 获取文件列表
* @param {*}
*
*/
export function getFileList(tableName, tableId) {
return request({
url: baseApi + "/infra/file/list?tableName=" + tableName + "&tableId=" + tableId,
method: "get",
data: {},
});
}
/**
* 图片上传
* @param {*}
*
*/
export function uploadFile(tableName, tableId,filePath,callBack) {
var token = storage.getStorage(storage.constant.token)
var url = getApp().globalData.request_url+baseApi
uni.uploadFile({
url: url+"/infra/file/upload?tableName="+tableName + "&tableId=" + tableId,
filePath: filePath,
name: 'file',
header: {
"Authorization": "Bearer " + token,
"tenant-id": 1
},
success: (uploadFileRes) => {
callBack(uploadFileRes.data)
console.log(uploadFileRes.data);
},
fail: (error) => {
callBack(undefined)
},
});
}

23
common/directory.js

@ -17,6 +17,8 @@ let nextActionList = [];
let inspectTypeList = [];
let sampleMethodList = [];
let transferModeList = [];
let countStageList = [];
// 获取业务类型字典项
@ -51,6 +53,7 @@ export function clearCacheData() {
inspectTypeList = [];
sampleMethodList =[];
transferModeList = [];
countStageList =[];
}
//获取字典信息
@ -436,6 +439,26 @@ export function getTransferModeName(value) {
return resultInfo
}
//获取盘点阶段名称
export function getCountStageName(value) {
var resultInfo = "";
if (countStageList.length == 0) {
countStageList = getDirectoryInfo("count_stage")
}
if (countStageList.length > 0) {
for (let item of countStageList) {
if (item.value == value) {
resultInfo = item.label
break;
}
}
}
return resultInfo
}

105
components/pullDown/pullDown.vue

@ -1,20 +1,26 @@
<template>
<view>
<view class="maskbox" v-show="active" @tap="maskClick"></view>
<view class="uni-combox" style="width: 100%;">
<view :class="description == 'row'?'uni-combox-row':'uni-combox-column'">
<view v-if="label" class="uni-combox__label" :style="labelStyle">
<text>{{label}}</text>
</view>
<view class="u-dropdown">
<view class="u-dropdown__menu" :style="{height:height+'rpx'}">
<view class="u-dropdown__menu">
<view class="u-dropdown__menu__item">
<view class="u-flex " style="width: 100%;">
<view class="u-close-wrap" v-if="isSearch">
<u-icon class="u-clear-icon" :size="30" :name="searchIcon"
:color="searchIconColor ? searchIconColor : color"></u-icon>
</view>
<input confirm-type="search" class="uni-combox__input" type="text" v-model="inputVal"
@confirm="confirm()" :placeholder="placeholder" />
<view class="u-input">
<u-input confirm-type="search" class="uni-combox__input"
:type="isAutoHeight ? 'textarea':'text'" v-model="inputVal" @confirm="confirm()"
:placeholder="placeholder" :auto-height="isAutoHeight"
:height="isAutoHeight ?height-20:height" />
</view>
<icon class="uni-combox__icon" type="clear" size="16" @tap="clearInputValue"
v-if="inputVal!=''" style="height: 100%;align-items: center;justify-content: center;" />
<!-- <image size="16" src="/static/icons/close-circle2.svg"
@ -31,7 +37,7 @@
</view>
<view class="u-dropdown__content" :style="[contentStyle, {
transition: `opacity ${duration / 1000}s linear`,
top: $u.addUnit(height),
top: $u.addUnit(height+28),
height: contentHeight + 'px'}]" @tap="maskClick" @touchmove.stop.prevent>
<view class="u-dropdown__content__popup" :style="[popupStyle]" @touchmove.stop.prevent="() => {}"
@ -43,13 +49,21 @@
<view v-for="(item, index) in filterOptions" style="width: 100%;"
@click="onSelectorClick(index)">
<view class="uni-combox-item">
<view v-if="itemTextCount == 1" class="uni-combox-item">
<text class="uni-combox-item-text" :title-style="{
color: inputVal === item ? activeColor : inactiveColor
}">{{item}}</text>
<u-icon v-if="inputVal === item" name="checkbox-mark" :color="activeColor" size="32">
</u-icon>
</view>
<view v-if="itemTextCount == 2" class="uni-combox-item2">
<text class="uni-combox-item-text" :title-style="{
color: inputVal === item ? activeColor : inactiveColor
}">{{item.value}}</text>
<text class="uni-combox-item-text" :title-style="{
color: inputVal === item ? activeColor : inactiveColor
}">{{item.desc}}</text>
</view>
<u-line class="line_color"></u-line>
</view>
</view>
@ -63,7 +77,7 @@
<script>
/**
* dropdown 下拉菜单
* @description 该组件一般用于向下展开菜单同时可切换多个选项卡的场景
* @description 菜单标题与编辑框排列方向,即水平排列row/垂直排列column,默认水平排列row
* @tutorial http://uviewui.com/components/dropdown.html
* @property {String} active-color 标题和选项卡选中的颜色默认#2979ff
* @property {String} inactive-color 标题和选项卡未选中的颜色默认#606266
@ -82,6 +96,11 @@
name: 'pulldown',
emits: ["open", "close", "update:modelValue", "input", "change", "confirm"],
props: {
// ,row/column
description: {
type: String,
default: 'row'
},
//
label: {
@ -121,7 +140,7 @@
// rpx
height: {
type: [Number, String],
default: 80
default: 55
},
//
borderBottom: {
@ -190,6 +209,17 @@
return [];
}
},
//
itemTextCount: {
type: Number,
default: 1
},
//
isAutoHeight: {
type: Boolean,
default: false
},
},
data() {
return {
@ -301,13 +331,24 @@
onSelectorClick(index) {
// console.log(index);
this.inputVal = this.options[index];
this.close();
// v-model
this.$emit("input", this.inputVal);
this.$emit("update:modelValue", this.inputVal);
// value
this.$emit("change", index, this.inputVal);
if (this.itemTextCount == 1) {
this.inputVal = this.options[index];
this.close();
// v-model
this.$emit("input", this.inputVal);
this.$emit("update:modelValue", this.inputVal);
// value
this.$emit("change", index, this.inputVal);
} else if (this.itemTextCount == 2) {
this.inputVal = this.options[index].value;
this.close();
// v-model
this.$emit("input", this.inputVal);
this.$emit("update:modelValue", this.inputVal);
// value
this.$emit("change", index, this.inputVal);
}
},
//
open() {
@ -386,6 +427,12 @@
<style scoped lang="scss">
@import "../../uni_modules/vk-uview-ui/libs/css/style.components.scss";
.u-input {
width: 100%;
padding-top: 5px;
padding-bottom: 5px;
}
.u-clear-icon {
@include vue-flex;
align-items: center;
@ -409,8 +456,9 @@
z-index: 4;
}
.uni-combox {
.uni-combox-row {
/* #ifndef APP-NVUE */
width: 100%;
display: flex;
/* #endif */
min-height: 40px;
@ -423,6 +471,21 @@
// z-index: 3;
}
.uni-combox-column {
/* #ifndef APP-NVUE */
width: 100%;
display: flex;
/* #endif */
min-height: 40px;
flex-direction: column;
align-items: flex-start;
position: relative;
background-color: #FFFFFF;
// padding-right: 5px;
// padding-left: 5px;
// z-index: 3;
}
.uni-combox__label {
font-size: 16px;
line-height: 22px;
@ -471,6 +534,16 @@
width: 100%;
}
.uni-combox-item2 {
display: flex;
flex-direction: column;
font-size: 16px;
height: 100%;
line-height: 100%;
background-color: #FFFFFF;
width: 100%;
}
.uni-combox-item-text {
font-size: 16px;
height: 100%;

5
mycomponents/location/requiredLocation.vue

@ -59,7 +59,10 @@
},
methods: {
showLocation() {
this.$refs.scanLocationCode.openScanPopup();
if(this.isShowEdit){
this.$refs.scanLocationCode.openScanPopup();
}
},
//
getLocation(location, code) {

47
mycomponents/qty/CountQtyEdit.vue

@ -43,7 +43,7 @@
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<view v-if="isShowBalance" class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
@ -52,7 +52,7 @@
</view>
<u-line />
<view v-if="isShowStatus" class="uni-flex uni-row space-between title"
style="align-items: center; padding-left: 20rpx;">
style="align-items: center; padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='false'
@ -102,7 +102,6 @@
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
originalInventoryStatus: "",
dataContent: {},
handleQty: 0,
seconds: 0,
@ -131,6 +130,10 @@
type: Boolean,
default: true
},
isShowBalance: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
@ -139,8 +142,6 @@
methods: {
openEditPopup(item, detaiList) {
this.dataContent = item
// this.originalInventoryStatus = this.dataContent.inventoryStatus
// this.inventoryStatus = this.dataContent.toInventoryStatus
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty)
this.showConfirmCountdown = false;
@ -151,8 +152,6 @@
openEditPopupShowSeconds(item, detaiList) {
this.dataContent = item;
// this.originalInventoryStatus = this.dataContent.inventoryStatus
// this.inventoryStatus = this.dataContent.toInventoryStatus
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.qty);
this.showConfirmCountdown = true;
@ -179,7 +178,6 @@
this.setValue();
},
cancel() {
this.dataContent.inventoryStatus = this.originalInventoryStatus;
this.closeEditPopup();
},
startTimer() {
@ -197,42 +195,11 @@
this.allQty = val * this.dataContent.stdPackQty;
},
setValue() {
this.dataContent.qty = Number(this.allQty)
this.dataContent.handleQty = Number(this.allQty)
this.$emit("confirm");
this.closeEditPopup();
// this.callback();
},
callback() {
//
var item = this.detaiList.find(
detail => {
if (detail.record == undefined) {
if (detail.packingNumber == this.dataContent.packingNumber &&
detail.batch == this.dataContent.batch &&
detail.inventoryStatus == this.inventoryStatus) {
return detail;
}
} else {
if (detail.record.packingNumber == this.dataContent.packingNumber &&
detail.record.batch == this.dataContent.batch &&
detail.record.inventoryStatus == this.inventoryStatus) {
return detail;
}
}
})
if (item == undefined) {
this.dataContent.inventoryStatus = this.inventoryStatus
this.dataContent.qty = Number(this.allQty)
this.$emit("confirm");
this.closeEditPopup();
} else {
this.$refs.comMessage.showErrorMessage("箱码[" + item.packingNumber + "]批次[" + item.batch + "]" + "状态[" +
getInventoryStatusName(item.inventoryStatus) + "]已经在列表中", res => {
})
}
},
updateStatus(value) {
this.inventoryStatus = value
console.log(this.inventoryStatus)

16
mycomponents/qty/compareQty.vue

@ -13,13 +13,15 @@
<view v-else-if="Number(recommendQty) ==Number( handleQty)" class="text_equal">
{{Number(handleQty)}}
</view>
</view>
<view class="std_split">/</view>
<view class="text_recommend center">
{{Number(recommendQty)}}
</view>
<view v-if="Number(handleQty)>0 " class="std_split">/</view>
<view v-if="isShowRecommendQty" class="text_recommend center">
{{Number(recommendQty)}}
</view>
</view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom"></uom>
<uom v-show="Number(handleQty)>0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom"></uom>
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
@ -71,6 +73,10 @@
isShowStdPack: {
type: Boolean,
default: true
},
isShowRecommendQty: {
type: Boolean,
default: true
}
},
watch: {

117
mycomponents/recommend/recommendCount.vue

@ -0,0 +1,117 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between ">
<!-- uni-inline-item 暂时拿掉-->
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</location>
</view>
<view>
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty> -->
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center">
<text style="font-size: 30rpx;color: #2979ff; "
@click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
locationTitle: {
type: String,
default: '库位'
},
isShowRecommendQty:{
type: Boolean,
default: true
}
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
}
}
}
</script>
<style>
</style>

4
package-lock.json

@ -221,7 +221,7 @@
},
"node_modules/vue-clipboard2": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
"dependencies": {
"clipboard": "^2.0.0"
@ -387,7 +387,7 @@
},
"vue-clipboard2": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
"requires": {
"clipboard": "^2.0.0"

12
pages.json

@ -37,12 +37,12 @@
// "autoBackButton": "true",
"buttons": [
//
// {
// "float": "right",
// "fontSize": "52rpx", //
// "text": "\ue706",
// "fontSrc": "/static/ali_icon/iconfont.ttf"
// }
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue706",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}

115
pages/config/config.vue

@ -1,42 +1,119 @@
<template>
<view class="" style="background-color: #fff; height: 100%;">
<view class="" style="font-size: 35rpx;padding: 15rpx;">
请求地址
<view class="page-wraper">
<view class="page-main" style="background-color: #fff; height: 100%;">
<pullDown label="项目名称" v-model="name" :options="arrayUnique(options,'name')" description='column' />
<pullDown label="服务器地址" v-model="value" :options="unique(options)" :itemTextCount="2" :isAutoHeight='true'
description='column' style="font-size: 35rpx;padding: 30rpx 0 0 0;" />
</view>
<!-- 页面底部 -->
<view class="page-footer">
<button type="primary" @click="saveClick">保存</button>
</view>
<uni-combox :candidates="candidates" placeholder="请选择请求地址" v-model="city"></uni-combox>
</view>
</template>
<script>
export default {
data() {
return {
candidates:["http://192.168.0.178:12080/admin-api(陈放)",
"http://192.168.0.178:12080/admin-api"
],
city:""
name: '',
value: '',
options: [{
name: '汽车镜备件',
desc: '汽车镜备件公司测试库',
value: 'http://192.168.0.178:12080/admin-api',
},
{
name: '汽车镜备件',
desc: '汽车镜备件现场测试库',
value: 'http://192.168.0.178:12080/admin-api',
},
{
name: '汽车镜备件',
desc: '汽车镜备件现场正式库',
value: 'http://192.168.0.178:12080/admin-api',
},
{
name: '富维汽车镜',
desc: '汽车镜备件现场正式库',
value: 'http://192.168.0.178:12080/admin-api',
},
],
};
},
onLoad(option) {
this.value = getApp().globalData.request_url;
},
methods: {
saveClick() {
getApp().globalData.request_url = this.value;
console.log(getApp().globalData.request_url);
// uni.navigateBack()
uni.navigateBack({
delta: 1 // delta
})
},
unique(arr) {
let that = this;
if (this.name == '') {
return this.options
} else {
return arr.filter(item => item.name === this.name);
}
},
arrayUnique(arr, type) {
return arr ? [
...new Set(
arr.map((item) => {
return item[type]
})
)
] : []
}
}
}
</script>
<style>
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-footer {
color: #fff;
line-height: 100rpx;
/* 不放大不缩小固定100rpx */
flex: 0 0 100rpx;
background-color: #00AAFF;
}
.container {
background-color: #f5f7fa;
/* 这里只是作为样式展示 */
}
</style>

6
pages/count/coms/comCountDetailCard.vue

@ -14,7 +14,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowFromLocation="false"></recommend>
<recommendCount :detail="item" :isShowFromLocation="false" :isShowRecommendQty="settingParam.isOpenCount=='TRUE'"></recommendCount>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
@ -28,7 +28,7 @@
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendCount from '@/mycomponents/recommend/recommendCount.vue'
import detailInfoPopup from '@/pages/count/coms/detailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
@ -41,7 +41,7 @@
export default {
components: {
itemQty,
recommend,
recommendCount,
detailInfoPopup,
comMessage
},

17
pages/count/coms/comCountJobCard.vue

@ -9,7 +9,7 @@
<view class="task_text">
<view class="">
盘点阶段 : {{dataContent.stage}}
盘点阶段 : {{getCountStageName(dataContent.stage)}}
</view>
</view>
@ -18,11 +18,19 @@
盘点库位 : {{dataContent.locationCode}}
</view>
</view>
<view class="task_text">
<view class="">
盘点策略 : {{isOpenCount(dataContent.isOpenCount)}}
</view>
</view>
</view>
</job-com-main-card>
</template>
<script>
import {
getCountStageName
} from '@/common/directory.js';
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
export default {
components: {
@ -40,7 +48,12 @@
},
methods: {
getCountStageName(value){
return getCountStageName(value)
},
isOpenCount(value){
return value=="TRUE"?"明盘":"盲盘"
}
}
}
</script>

23
pages/count/coms/jobInfoPopup.vue

@ -6,12 +6,22 @@
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">计划单号 : </text>
<text class="text_wrap">{{dataContent.PlanNumber}} </text>
<text class="text_wrap">{{dataContent.planNumber}} </text>
</view>
<view class="item">
<text class="item_title">阶段 : </text>
<text class="text_wrap">{{dataContent.Stage}} </text>
<text class="text_wrap">{{getCountStageName(dataContent.stage)}} </text>
</view>
<view class="item">
<text class="item_title">库位 : </text>
<text class="text_wrap">{{dataContent.locationCode}} </text>
</view>
<view class="item">
<text class="item_title">盘点策略 : </text>
<text class="text_wrap">{{isOpenCount(dataContent.isOpenCount)}}</text>
</view>
</view>
</view>
</job-common-info>
@ -20,6 +30,9 @@
</template>
<script>
import {
getCountStageName
} from '@/common/directory.js';
import jobCommonInfo from '@/mycomponents/job/jobCommonInfo.vue'
export default {
components: {
@ -45,6 +58,12 @@
closePopup() {
this.$refs.popup.close()
},
getCountStageName(value) {
return getCountStageName(value)
},
isOpenCount(value) {
return value == "TRUE" ? "明盘" : "盲盘"
}
}
}
</script>

276
pages/count/job/countDetail.vue

@ -1,6 +1,27 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="cen_card" style="padding-top: 10rpx;padding-bottom: 10rpx;">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">阶段</view>
<view>{{getCountStageName(jobContent.stage)}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">策略</view>
<view>{{ isOpenCount(jobContent.isOpenCount) }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库位</view>
<view>{{fromLocationCode}}</view>
</view>
</view>
</view>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;"></u-line>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
@ -19,9 +40,6 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="盘点库位" :locationCode="fromLocationCode" :isShowEdit="jobContent.allowModifyLocation==1"
@getLocation='scanLocationCode' :locationTypeList="locationTypeList"></requiredLocation>
<u-line></u-line>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -31,7 +49,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<count-qty-edit ref="CountQtyEdit" @confirm="editConfirm" :isShowStatus="false" :allowEditStatus="true">
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" :allowEditStatus="false"
:isShowBalance="jobContent.isOpenCount=='TRUE'">
</count-qty-edit>
<com-message ref="comMessage"></com-message>
</view>
@ -50,6 +69,9 @@
navigateBack,
getPackingNumberAndBatch
} from '@/common/basic.js';
import {
getCountStageName
} from '@/common/directory.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -57,7 +79,8 @@
import comCountDetailCard from '@/pages/count/coms/comCountDetailCard.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import CountQtyEdit from '@/mycomponents/qty/CountQtyEdit.vue'
import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'receipt_detail',
@ -68,7 +91,8 @@
requiredLocation,
comMessage,
winScanPackAndLocation,
CountQtyEdit,
countQtyEdit,
jobTop
},
data() {
return {
@ -81,9 +105,6 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
itemEditInfo: {}
};
},
@ -91,15 +112,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -158,14 +178,11 @@
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.fromLocationCode = that.jobContent.locationCode;
that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.subList)
} else {
that.showErrorMessage('列表数据为0');
}
that.jobContent = res.data;
that.fromLocationCode = that.jobContent.locationCode;
that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.subList)
this.calcHandleQty();
}
}).catch(error => {
@ -209,9 +226,8 @@
createDetailInfo(data) {
data.scaned = false;
// data.record = {};
let detail = data;
detail.balanceQty = detail.qty
detail.balanceQty = 0
detail.inventoryStatus = detail.inventoryStatus
detail.fromLocationCode = this.fromLocationCode
return detail;
@ -233,12 +249,8 @@
for (let item of this.detailSource) {
item.handleQty = 0;
for (let detail of item.subList) {
if (detail.scaned) {
if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty)
} else {
item.handleQty += Number(detail.qty)
}
if (detail != undefined && detail.scaned) {
item.handleQty += Number(detail.qty)
}
}
}
@ -287,30 +299,19 @@
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
var balanceQty = result.balance.qty;
var itemCode = result.balance.itemCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
var itemEditInfo;
//
if (detail == undefined) {
//
this.addNewItemCodeToList(result)
} else {
//
// var itemDetail;
// var index;
// for (var i = 0; i < detail.subList.length; i++) {
// if (detail.subList[i].packingNumber == packingNumber &&
// detail.subList[i].batch == batch &&
// detail.subList[i].inventoryStatus == inventoryStatus) {
// index = i;
// itemDetail = detail.subList[i]
// break
// }
// }
this.itemEditInfo = detail.subList.find(item => {
itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
item.inventoryStatus == inventoryStatus) {
@ -318,19 +319,18 @@
}
})
if (this.itemEditInfo == undefined) {
if (itemEditInfo == undefined) {
//
this.addExistItemCodeToList(detail, result);
} else {
//
if (this.itemEditInfo.scaned) {
if (itemEditInfo.scaned) {
this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber +
"】已经完成盘点,是否要编辑数量",
res => {
// this.$.refs["countDetail_" + index][0].edit(itemDetail)
if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo.record,
this.$refs.countQtyEdit.openEditPopup(itemEditInfo,
detail.subList);
} else {
this.scanPopupGetFocus();
@ -338,12 +338,12 @@
})
} else {
// this.$.refs["countDetail_" + index][0].editSeconds(itemDetail)
this.itemEditInfo.scaned = true;
this.itemEditInfo.record = this.createRecordInfo(this.itemEditInfo);
this.itemEditInfo.record.stdPackQty = result.package.stdPackQty;
this.itemEditInfo.record.stdPackUnit = result.package.stdPackUnit;
this.$refs.CountQtyEdit.openEditPopupShowSeconds(this.itemEditInfo.record, detail
itemEditInfo.scaned = true;
itemEditInfo.handleQty = balanceQty;
itemEditInfo.balanceQty = balanceQty;
itemEditInfo.stdPackQty = result.package.stdPackQty;
itemEditInfo.stdPackUnit = result.package.stdPackUnit;
this.$refs.countQtyEdit.openEditPopupShowSeconds(itemEditInfo, detail
.subList);
this.updateData()
}
@ -361,7 +361,6 @@
if (res) {
var item = this.createAddItemInfo(result.balance, result.package);
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
newDetail.record = this.createRecordInfo(newDetail);
item.subList.push(newDetail);
this.detailSource.push(item)
this.updateData()
@ -377,9 +376,7 @@
if (res) {
detail.qty += Number(detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
newDetail.record = this.createRecordInfo(newDetail);
detail.subList.push(newDetail);
var test = this.detailSource;
this.updateData()
}
@ -395,55 +392,43 @@
qty: Number(balance.qty),
handleQty: 0,
uom: pack.uom,
subList: []
subList: [],
}
return item;
},
createAddDetailInfo(balance, pack) {
var detail = {
id: "0",
scaned: true,
balanceQty: balance.qty,
toInventoryStatus: balance.inventoryStatus,
fromLocationCode: balance.locationCode,
id: "",
countDetailNumber: "",
ownerCode: balance.OwnerCode,
ownerCode: balance.ownerCode,
packingNumber: balance.packingNumber,
containerNumber: pack.ContainerNumber,
containerNumber: pack.containerNumber,
batch: balance.batch,
inventoryStatus: balance.inventoryStatus,
itemCode: balance.itemCode,
itemCode: pack.itemCode,
itemName: pack.itemName,
itemDesc1: pack.itemDesc1,
itemDesc2: pack.itemDesc2,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
projectCode: "",
qty: balance.qty,
qty: 0,
handleQty: balance.qty,
uom: balance.uom,
masterID: "",
number: "",
number: this.jobContent.number,
remark: "",
creationTime: "",
creatorId: "",
creatorName: "",
siteId: ""
countQty: balance.qty,
balanceQty: balance.qty,
fromLocationCode: balance.locationCode,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
creator:this.$store.state.user.id
}
return detail;
},
createRecordInfo(detail) {
var record = {}
detail.scaned = true;
// let record = JSON.parse(JSON.stringify(detail));
//
Object.assign(record, detail)
record.fromLocationCode = this.fromLocationCode;
return record;
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
@ -456,19 +441,59 @@
},
getScanCount() {
var scanCount = 0;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
scanCount = scanCount + 1;
}
})
})
return scanCount;
},
getTotalCount() {
var totalCount = 0;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
totalCount = totalCount + 1;
})
})
return totalCount;
},
commit() {
if (this.scanCount == this.subList.length) {
this.scanCount = this.getScanCount();
if (this.scanCount == this.getTotalCount()) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
} else if (this.scanCount < this.getTotalCount()) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
this.$refs.comMessage.showQuestionMessage("已经扫描[" + this.scanCount +
"]总共[" + this
.getTotalCount() + "],是否把未扫描的盘点数量设置为0?",
res => {
if (res) {
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (!detail.scaned) {
detail.countQty = 0;
}
})
})
this.submitJob();
}
});
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.subList.length + "]箱", res => {
"]总共[" + this
.getTotalCount() + "]", res => {
if (res) {
this.openScanPopup();
}
@ -478,41 +503,25 @@
},
submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
countJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成盘点记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
//
// getManagementPrecisions(itemCodes, this.toLocationCode, res => {
// if (res.success) {
// this.managementList = res.list;
// var params = this.setParams()
// console.log("", JSON.stringify(params));
// // var params = this.getParams();
// // countJobSubmit(this.id, params).then(res => {
// // if (res.data) {
// // this.showCommitSuccessMessage("<br>" + res.data.Number, )
// // } else {
// // this.showErrorMessage("[" + res.msg + "]")
// // }
// // uni.hideLoading()
// // }).catch(error => {
// // uni.hideLoading()
// // this.showErrorMessage(error)
// // })
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
// });
},
setParams() {
@ -522,14 +531,12 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
subList.push(detail)
detail.countQty = detail.handleQty;
}
subList.push(detail)
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
@ -564,8 +571,8 @@
},
editItem(item) {
var detail = this.detailSource.find(r => r.itemCode == item.record.itemCode);
this.$refs.CountQtyEdit.openEditPopup(item.record,
var detail = this.detailSource.find(r => r.itemCode == item.itemCode);
this.$refs.countQtyEdit.openEditPopup(item,
detail.subList);
},
@ -573,7 +580,14 @@
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1);
})
},
getCountStageName(value) {
return getCountStageName(value)
},
isOpenCount(value) {
return value == "TRUE" ? "明盘" : "盲盘"
}
}
}

2
pages/index/index.vue

@ -272,7 +272,7 @@
types:["job_status","location_type","item_status","uom",
"inventory_status","container_type","pack_unit","unplanned_receipt_reason",
"unplanned_issue_reason","scrap_reason","inspect_failed_reason",
"request_status","inspect_type","next_action","sample_method","transfer_mode"]
"request_status","inspect_type","next_action","sample_method","transfer_mode","count_stage"]
}
getDictionaryItem(params).then(res => {
if (res.data.length > 0) {

118
pages/inspect/coms/inspectEdit.vue

@ -1,6 +1,6 @@
<template>
<view class="">
<uni-popup ref="editPopup" class="nopadpop camera_pop">
<uni-popup ref="editPopup" class="nopadpop camera_pop" :maskClick="false">
<view class="uni-list popuni_list camera_list">
<view class="list_cell uni-flex uni-row space-between">
<view class="title">箱码</view>
@ -49,8 +49,8 @@
</view>
</view>
<uploadCamera ref="uploadImage" style="margin: 10rpx;" :disabled="disabled"></uploadCamera>
<uploadCamera ref="uploadImage" style="margin: 10rpx;" :disabled="disabled" @delete="deleteImg"
@select="select"></uploadCamera>
</view>
<view class="pop_btn uni-flex uni-row space-between" v-if="!disabled">
<button class="cancel" @click="back">返回</button>
@ -65,6 +65,12 @@
import {
getInspectFailedReasonList,
} from '@/common/directory.js';
import {
uploadFile,
getFileList,
deleteFileById
} from '@/api/request2.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import uploadCamera from '@/pages/inspect/coms/uploadCamera.vue'
import uom from '@/mycomponents/qty/uom.vue'
@ -81,7 +87,8 @@
failedReasonIndex: 0,
failedReasonArray: [],
dataContent: {},
failedReasonArray: []
failedReasonArray: [],
picInfoList: []
}
},
props: {
@ -101,11 +108,93 @@
this.failedReasonArray = getInspectFailedReasonList();
//
this.dataContent = Object.assign({}, item)
this.getFileList();
this.$refs['editPopup'].open("bottom");
},
getFileList() {
getFileList("jobInspectDetail", this.dataContent.id).then(res => {
if(res.data){
var imageFiles = [];
res.data.forEach(item=>{
var image = this.createImage(item.id, item.url, item.path, item.size)
imageFiles.push(image)
})
}
if (imageFiles.length > 0) {
this.$nextTick(function() {
this.$refs.uploadImage.setFiles(imageFiles);
this.setPhotosInfo();
})
}
})
},
setPhotosInfo(){
var list = this.$refs.uploadImage.getFiles()
var photoItem = "";
for (var i = 0; i < list.length; i++) {
if (list.length - 1 == i) {
photoItem = photoItem + list[i].url
} else {
photoItem = photoItem + list[i].url + ","
}
}
this.dataContent.photos = photoItem;
},
createImage(id, url, fileName, size) {
let image = {
id: id,
name: fileName,
extname: "png",
fileType: "image",
url: url,
size: size,
image: {
width: 175,
height: 175,
location: url,
},
path: url,
progress: 100,
status: "ready"
}
return image;
},
deleteImg(content) {
var id = content.id
if (id != undefined) {
deleteFileById(id).then(res => {
if (res.data) {
uni.showToast({
title: "删除成功"
})
}
}).catch(error => {
console.log(error)
})
} else {
this.getFileList();
}
},
select(content) {
this.uploadFile(content);
},
back() {
this.$refs['editPopup'].close();
this.afterSave()
},
maskClick() {
},
afterSave() {
@ -119,6 +208,8 @@
}
});
},
save() {
var failedQty = Number(this.dataContent.failedQty);
var crackQty = Number(this.dataContent.crackQty);
@ -137,13 +228,26 @@
}
this.dataContent.failedQty = failedQty;
this.dataContent.crackQty = crackQty
this.dataContent.goodQty = this.dataContent.handleQty -failedQty-crackQty
this.dataContent.goodQty = this.dataContent.handleQty - failedQty - crackQty
this.afterSave()
},
uploadFile(content) {
uploadFile("jobInspectDetail", this.dataContent.id, content.path, res => {
if (res != undefined) {
uni.showToast({
title: "上传成功"
})
} else {
uni.showToast({
title: "上传失败"
})
}
this.getFileList();
})
}
}
}
</script>

6
pages/inspect/coms/uploadCamera.vue

@ -33,12 +33,14 @@
},
//
select(e) {
console.log('选择文件:', e)
// console.log('', e)
this.$emit("select",e.tempFiles[0])
},
//
deleteImg(e) {
console.log('删除:', e)
// console.log('', e)
this.$emit("delete",e.tempFile)
},
//

30
pages/inspect/job/inspectDetail.vue

@ -39,8 +39,9 @@
takeInspectJob,
cancleTakeInspectJob,
getInspectJobDetail,
getBasicLocationByCode,
inspectJobSubmit
inspectJobSubmit,
deleteFileById,
getFileList
} from '@/api/request2.js';
import {
goHome,
@ -136,6 +137,7 @@
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
@ -145,6 +147,29 @@
},
methods: {
deleteFileById(id){
deleteFileById(id).then(res=>{
})
},
getFileList(id){
getFileList("jobInspectDetail", id).then(res => {
if(res.data){
res.data.forEach(res=>{
this.deleteFileById(res.id)
})
}
})
},
clearPicList(subList){
subList.forEach(item=>{
this.getFileList(item.id)
})
},
//
receive(callback) {
uni.showLoading({
@ -179,6 +204,7 @@
that.jobContent.failedQty = this.failedQty
that.jobContent.crackQty = this.crackQty;
that.subList = res.data.subList;
this.clearPicList(that.subList);
that.subList.forEach(res => {
res.batch = that.jobContent.batch
res.goodQty = 0;

27
pages/inspect/job/inspectFullDetail.vue

@ -39,8 +39,9 @@
takeInspectJob,
cancleTakeInspectJob,
getInspectJobDetail,
getBasicLocationByCode,
inspectJobSubmit
inspectJobSubmit,
deleteFileById,
getFileList
} from '@/api/request2.js';
import {
goHome,
@ -147,6 +148,27 @@
},
methods: {
deleteFileById(id){
deleteFileById(id).then(res=>{
})
},
getFileList(id){
getFileList("jobInspectDetail", id).then(res => {
if(res.data){
res.data.forEach(res=>{
this.deleteFileById(res.id)
})
}
})
},
clearPicList(subList){
subList.forEach(item=>{
this.getFileList(item.id)
})
},
//
receive(callback) {
uni.showLoading({
@ -182,6 +204,7 @@
this.jobContent.crackQty = 0;
this.jobContent.notPassedQty = 0;
that.subList = res.data.subList;
this.clearPicList(that.subList);
that.subList.forEach(res => {
res.batch = that.jobContent.batch
res.goodQty = 0;

4
pages/productionReturn/coms/comReturnRequestCreator.vue

@ -8,9 +8,9 @@
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<view v-if="item.batch!=''" style="margin-left: 10rpx;">
<!-- <view v-if="item.batch!=''" style="margin-left: 10rpx;">
<batch :batch="item.batch" ></batch>
</view>
</view> -->
<u-line />
</uni-swipe-action-item>

2
pages/productionReturn/request/returnRequestCreate.vue

@ -185,7 +185,7 @@
productionReturnRequestCreate(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data)
this.showCommitSuccessMessage("提交成功<br>生成发料申请<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}

2
pages/purchaseReceipt/coms/comReceiptDetailCard.vue

@ -10,7 +10,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowLocation="false" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
<recommend :detail="item" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://192.168.0.230:12080/admin-api",
"value": "http://192.168.0.157:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

4
test/pullDownTest.vue

@ -5,7 +5,7 @@
<!-- <view class="u-demo-area u-flex u-row-center">
<pullDown label="所在城市市111" :active="true" :close-on-click-mask="mask" ref="uDropdown"
:activeColor="activeColor" :borderBottom="borderBottom">
<u-dropdown-item v-model="value1" title="距离" :options="options1"></u-dropdown-item>
<u-dropdown-item v-model="value1" title="距离" :options="options"></u-dropdown-item>
</pullDown>
</view> -->
@ -121,7 +121,7 @@
value1: '',
value2: '2',
mask: true,
options1: [{
options: [{
label: '默认排序',
value: 1,
},

2
test/pullDownTest2.vue

@ -59,7 +59,7 @@
value1: '',
value2: '2',
mask: true,
options1: [{
options: [{
label: '默认排序',
value: 1,
},

Loading…
Cancel
Save