单据出库加功能
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<view class="zd-col-6"><span class="filter_label">单据编码</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.code}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">单据类型</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.form_type}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{formTypeName}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">创建时间</span></view>
|
||||
@@ -16,12 +16,12 @@
|
||||
<view class="zd-col-6"><span class="filter_label">创建人</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.create_name}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<!-- <view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">物料编码</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.material_code}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">单位</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.unit_name}}</span></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-6"><span class="filter_label">仓库</span></view>
|
||||
<view class="zd-col-6 filter_select">
|
||||
@@ -32,6 +32,16 @@
|
||||
<uni-data-select v-model="currentData.product_area" :localdata="options2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="required" class="zd-row">
|
||||
<view class="zd-col-10">
|
||||
<span class="filter_label">关联用料清单编码</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<search-box
|
||||
v-model="code"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="JSON.stringify(currentData) !== '{}'" class="grid-wraper">
|
||||
<view class="slide_new">
|
||||
@@ -74,7 +84,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="toEmpty">返回</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageConfirm">出库确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || (required && !code)}" :disabled="disabled" @tap="_outStorageConfirm">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -82,7 +92,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageOrderList, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
|
||||
import {outStorageOrder, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -97,7 +107,10 @@
|
||||
options1: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
||||
index1: '',
|
||||
options2: [{value: 'A1', text: 'A1车间'}, {value: 'A2', text: 'A2车间'}, {value: 'A3', text: 'A3车间'}],
|
||||
allCheck: false
|
||||
allCheck: false,
|
||||
formTypeName: '',
|
||||
required: false,
|
||||
code: ''
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -106,6 +119,12 @@
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
this._outStorageOrder()
|
||||
if (this.currentData.form_type === 'STK_TransferDirect' || this.currentData.form_type === 'ka7c19edf9d4b4b39b8cc4a06802163b0' || this.currentData.form_type === 'STK_MisDelivery') {
|
||||
this.required = true
|
||||
} else {
|
||||
this.required = false
|
||||
}
|
||||
this.dataList = [...this.currentData.children]
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'now_assign_qty', el.qty)
|
||||
@@ -116,13 +135,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
if (e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/outbound/bill-list?title=单据列表&id=' + e
|
||||
})
|
||||
}
|
||||
// 出库单类型
|
||||
async _outStorageOrder () {
|
||||
let res = await outStorageOrder()
|
||||
res.map(el => {
|
||||
if (el.value === this.currentData.form_type) {
|
||||
this.formTypeName = el.text
|
||||
}
|
||||
})
|
||||
},
|
||||
selectChange1 (e) {
|
||||
if (e) {
|
||||
@@ -172,12 +192,12 @@
|
||||
},
|
||||
async _outStorageConfirm () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
if (JSON.stringify(this.currentData) === '{}' || (this.required && !this.code)) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
let obj = Object.assign(this.currentData, {children: arr, stor_code: this.index1})
|
||||
let obj = Object.assign(this.currentData, {children: arr, stor_code: this.index1, prd_ppbom_no: this.code})
|
||||
try {
|
||||
let res = await outStorageConfirm(obj)
|
||||
if (res.code === '200') {
|
||||
@@ -206,7 +226,7 @@
|
||||
.filter_label
|
||||
font-size: 26rpx;
|
||||
.slide_new
|
||||
padding-bottom 110px
|
||||
// padding-bottom 110px
|
||||
.slide_new table td
|
||||
overflow visible
|
||||
/deep/ .uni-select__input-text
|
||||
|
||||
@@ -97,7 +97,7 @@ export const groupMaterList = () => {
|
||||
return res
|
||||
}
|
||||
export const outStorageOrder = () => {
|
||||
let res = [{value: '1', text: 'a'}]
|
||||
let res = [{value: '1', text: 'a'},{"text": "直接调拨单", "value": "STK_TransferDirect"},{"text": "简单领料申请单","value": "ka7c19edf9d4b4b39b8cc4a06802163b0"},{"text": "其他出库单", "value": "STK_MisDelivery"}]
|
||||
return res
|
||||
}
|
||||
export const outStorageOrderList = (page, size, type) => {
|
||||
@@ -106,7 +106,7 @@ export const outStorageOrderList = (page, size, type) => {
|
||||
"content": [
|
||||
{
|
||||
"code": "PPBOM241102856",
|
||||
"form_type": "单据类型",
|
||||
"form_type": "ka7c19edf9d4b4b39b8cc4a06802163b0",
|
||||
"remark": "备注",
|
||||
"create_time": "2024-10-20 21:41:50",
|
||||
"create_name": "创建人",
|
||||
|
||||
Reference in New Issue
Block a user