master
hou 4 years ago
parent 4487479a25
commit 77fa0b0730

@ -23,7 +23,7 @@
</u-form-item> </u-form-item>
<!-- 成品描述 --> <!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')"> <u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="form.productDescZh" placeholder="" /> <u-input :disabled="true" v-model="form.productDescZh" placeholder="" style="overflow: hidden;"/>
</u-form-item> </u-form-item>
<!-- 成品编码 --> <!-- 成品编码 -->
<u-form-item :label="$t('message.product_FGCode')"> <u-form-item :label="$t('message.product_FGCode')">

@ -24,7 +24,7 @@
</u-form-item> </u-form-item>
<!-- 成品描述 --> <!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')"> <u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" /> <u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item> </u-form-item>
<!-- 数量 --> <!-- 数量 -->
<u-form-item :label="$t('message.product_Number')"> <u-form-item :label="$t('message.product_Number')">

@ -37,7 +37,7 @@
</u-row> </u-row>
<!-- 成品描述 --> <!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')"> <u-form-item :label="$t('message.product_FGDes')">
<u-input v-model="productDescZh" :placeholder="$t('message.po_PleaseInput')" /> <u-input v-model="productDescZh" :placeholder="$t('message.po_PleaseInput')" style="overflow: hidden" />
</u-form-item> </u-form-item>
<!-- 成品编码 --> <!-- 成品编码 -->
<u-form-item :label="$t('message.product_FGCode')"> <u-form-item :label="$t('message.product_FGCode')">

@ -24,7 +24,7 @@
</u-form-item> </u-form-item>
<!-- 成品描述 --> <!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')"> <u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" /> <u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item> </u-form-item>
<!-- 数量 --> <!-- 数量 -->
<u-form-item :label="$t('message.product_Number')"> <u-form-item :label="$t('message.product_Number')">

@ -23,7 +23,7 @@
</u-form-item> </u-form-item>
<!-- 成品描述 --> <!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')"> <u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="model.orderInInfo.productDescZh" placeholder="" /> <u-input :disabled="true" v-model="model.orderInInfo.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item> </u-form-item>
<!-- 数量 --> <!-- 数量 -->
<u-form-item :label="$t('message.product_Number')"> <u-form-item :label="$t('message.product_Number')">

@ -1,135 +1,75 @@
<template> <template>
<view class="page-raw-receipt"> <view class="page-raw-receipt">
<!-- 头部 --> <!-- 头部 -->
<view <view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t("message.CommissionEntrant") }}</view> <view class="title">{{ $t('message.CommissionEntrant') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="content"> <view class="content">
<!-- 单号 --> <!-- 单号 -->
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t("message.CommissionedSingleNumber") }}</view> <view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search <u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="form.documentNo" @search="query" :show-action="false"></u-search>
:placeholder="$t('message.InventoryPleaseScan')"
v-model="form.documentNo"
@search="query"
:show-action="false"
></u-search>
</view> </view>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="query">{{ <u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
$t("message.Query")
}}</u-button>
</view> </view>
</view> </view>
<!-- 物料 --> <!-- 物料 -->
<view class="material"> <view class="material">
<view class="material-left"> <view class="material-left">
<view>{{ $t("message.CommissionedMaterielNo") }}</view> <view>{{ $t('message.CommissionedMaterielNo') }}</view>
<jPicker <jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" />
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="materialChoice"
showKey="value"
valKey="value"
:val="every.materialCode"
class="search"
:options="materialList"
/>
</view> </view>
</view> </view>
<view class="material"> <view class="material">
<view class="material-right"> <view class="material-right">
<view class="material-right-title">{{ <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
$t("message.CommissionedMaterielDesc") <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
}}</view>
<view class="material-right-code">{{ every.materialDesc }}</view>
</view> </view>
</view> </view>
<!-- 需求数量 --> <!-- 需求数量 -->
<view class="number"> <view class="number">
<view class="number-left"> <view class="number-left">
<view class="number-left-title">{{ <view class="number-left-title">{{ $t('message.CommissionedDemandData') }}</view>
$t("message.CommissionedDemandData") <u-input v-model="every.poAmount" placeholder=" " :type="type" :border="border" class="input" disabled />
}}</view>
<u-input
v-model="every.poAmount"
placeholder=" "
:type="type"
:border="border"
class="input"
disabled
/>
</view> </view>
<view class="number-right"> <view class="number-right">
<view class="number-right-title">{{ <view class="number-right-title">{{ $t('message.CommissionedCumulativeData') }}</view>
$t("message.CommissionedCumulativeData") <u-input :placeholder="$t('message.po_PleaseInput')" v-model="every.receiptAmount" :type="type" :border="border" class="input" disabled />
}}</view>
<u-input
:placeholder="$t('message.po_PleaseInput')"
v-model="every.receiptAmount"
:type="type"
:border="border"
class="input"
disabled
/>
</view> </view>
</view> </view>
<!-- 库位 --> <!-- 库位 -->
<view class="library"> <view class="library">
<view class="library-left"> <view class="library-left">
<view>{{ $t("message.CommissionedLocation") }}</view> <view>{{ $t('message.CommissionedLocation') }}</view>
<jPicker <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode" class="search" :options="Location" />
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view> </view>
<view class="library-right"> <view class="library-right">
<view class="library-right-title">{{ <view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
$t("message.CommissionedThisNumber") <u-input :placeholder="$t('message.po_PleaseInput')" v-model="nowAmount" :type="type" :border="border" class="input" />
}}</view>
<u-input
:placeholder="$t('message.po_PleaseInput')"
v-model="nowAmount"
:type="type"
:border="border"
class="input"
/>
</view> </view>
</view> </view>
<!-- 添加 --> <!-- 添加 -->
<view class="add"> <view class="add">
<u-button type="primary" @click="Add">{{ <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
$t("message.product_add")
}}</u-button>
</view> </view>
<!-- 表格 --> <!-- 表格 -->
<u-table class="library-table"> <u-table class="library-table">
<u-tr class="u-tr"> <u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th> <u-th class="u-th">{{ $t('message.product_Location') }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th> <u-th class="u-th">{{ $t('message.product_Number') }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th> <u-th class="u-th">{{ $t('message.operation') }}</u-th>
</u-tr> </u-tr>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index"> <u-tr class="u-tr" v-for="(item, index) in list" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td> <u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.nowAmount }}</u-td> <u-td class="u-td">{{ item.nowAmount }}</u-td>
<u-td class="u-td"> <u-td class="u-td">
<div class="u-td" @click="deleteItem(index)"> <u-button type="error" size="small" class="u-td" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
{{ $t("message.product_Delete") }}
</div>
</u-td> </u-td>
</u-tr> </u-tr>
</u-table> </u-table>
@ -138,31 +78,25 @@
<view class="bottom-bar"> <view class="bottom-bar">
<u-row class="button-bar"> <u-row class="button-bar">
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="bill">{{ <u-button type="primary" @click="bill">{{ $t('message.CommissionedEntrantDetails') }}</u-button>
$t("message.CommissionedEntrantDetails")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="onSubmit">{{ <u-button type="primary" @click="onSubmit">{{ $t('message.product_Upload') }}</u-button>
$t("message.product_Upload")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="uni.navigateBack()">{{ <u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Ref } from "vue-property-decorator"; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import jPicker from "@/components/J-Picker/jPicker.vue"; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from "@/store/modules/session"; import { session } from '@/store/modules/session';
import { VForm, VFormRules } from "vue/types/form"; import { VForm, VFormRules } from 'vue/types/form';
import model from "./model"; import model from './model';
@Component({ @Component({
components: { components: {
jPicker, jPicker,
@ -171,27 +105,25 @@ import model from "./model";
export default class dnReceiptDom extends BasePage { export default class dnReceiptDom extends BasePage {
model = model; model = model;
form: any = { form: any = {
documentNo: "", documentNo: '',
}; };
material: any = {}; material: any = {};
materialList: any = []; materialList: any = [];
list: any = []; list: any = [];
every: any = ""; every: any = '';
value = ""; value = '';
type = "text"; type = 'text';
border = true; border = true;
nowAmount: any = ""; nowAmount: any = '';
// //
Location: any = []; Location: any = [];
// //
wlCode: any = ""; wlCode: any = '';
// //
async onLoad() { async onLoad() {
// //
let means: any = JSON.parse( let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
);
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = { let content = {
loginName: means.session.user.loginName, loginName: means.session.user.loginName,
sendSpot: sendSpot, sendSpot: sendSpot,
@ -199,24 +131,24 @@ export default class dnReceiptDom extends BasePage {
workArea: session.workareaCode, workArea: session.workareaCode,
}; };
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
console.log("res res",res); console.log('res res', res);
// undefined // undefined
//guoshuang undefiend //guoshuang undefiend
res.forEach((item: any) => { res.forEach((item: any) => {
let pickerName: any = {}; let pickerName: any = {};
pickerName.label = item.locationCode; pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")"; pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); this.Location.push(pickerName);
}); });
console.log("库位列表",this.Location); console.log('库位列表', this.Location);
} }
// //
async query() { async query() {
if (this.form.documentNo == "") { if (this.form.documentNo == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips1") as any, title: this.$t('message.Commission_tips1') as any,
}); });
return; return;
} }
@ -246,24 +178,24 @@ export default class dnReceiptDom extends BasePage {
} }
// //
Add() { Add() {
if (this.nowAmount == "" || this.wlCode == "") { if (this.nowAmount == '' || this.wlCode == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips2") as any, title: this.$t('message.Commission_tips2') as any,
}); });
return; return;
} }
if (parseFloat(this.nowAmount) <= 0) { if (parseFloat(this.nowAmount) <= 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips3") as any, title: this.$t('message.Commission_tips3') as any,
}); });
return; return;
} }
if (parseFloat(this.nowAmount) > this.every.poAmount) { if (parseFloat(this.nowAmount) > this.every.poAmount) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips4") as any, title: this.$t('message.Commission_tips4') as any,
}); });
return; return;
} }
@ -281,8 +213,8 @@ export default class dnReceiptDom extends BasePage {
async onSubmit() { async onSubmit() {
if (this.list == null || this.list.length == 0) { if (this.list == null || this.list.length == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips5") as any, title: this.$t('message.Commission_tips5') as any,
}); });
} }
let upload = { let upload = {
@ -294,22 +226,20 @@ export default class dnReceiptDom extends BasePage {
}; };
await this.model.submitOutsourcing(upload); await this.model.submitOutsourcing(upload);
this.list = []; this.list = [];
this.wlCode = ""; this.wlCode = '';
this.nowAmount = ""; this.nowAmount = '';
this.every = ""; this.every = '';
this.materialList = []; this.materialList = [];
} }
async bill() { async bill() {
if (this.form.documentNo == "") { if (this.form.documentNo == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message._tips6") as any, title: this.$t('message._tips6') as any,
}); });
return; return;
} }
let person = JSON.parse( let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let content = { let content = {
loginName: person.session.user.loginName, loginName: person.session.user.loginName,
poNo: this.form.documentNo, poNo: this.form.documentNo,
@ -329,8 +259,7 @@ export default class dnReceiptDom extends BasePage {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-raw-receipt { .page-raw-receipt {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;

@ -1,135 +1,75 @@
<template> <template>
<view class="page-raw-receipt"> <view class="page-raw-receipt">
<!-- 头部 --> <!-- 头部 -->
<view <view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t("message.CommissionGoOut") }}</view> <view class="title">{{ $t('message.CommissionGoOut') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="content"> <view class="content">
<!-- 单号 --> <!-- 单号 -->
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t("message.CommissionedSingleNumber") }}</view> <view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search <u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="form.documentNo" @search="query" :show-action="false"></u-search>
:placeholder="$t('message.InventoryPleaseScan')"
v-model="form.documentNo"
@search="query"
:show-action="false"
></u-search>
</view> </view>
<view class="single-right"> <view class="single-right">
<u-button type="primary" @click="query">{{ <u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
$t("message.Query")
}}</u-button>
</view> </view>
</view> </view>
<!-- 物料 --> <!-- 物料 -->
<view class="material"> <view class="material">
<view class="material-left"> <view class="material-left">
<view>{{ $t("message.CommissionedMaterielNo") }}</view> <view>{{ $t('message.CommissionedMaterielNo') }}</view>
<jPicker <jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" />
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="materialChoice"
showKey="value"
valKey="value"
:val="every.materialCode"
class="search"
:options="materialList"
/>
</view> </view>
</view> </view>
<view class="material"> <view class="material">
<view class="material-right"> <view class="material-right">
<view class="material-right-title">{{ <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
$t("message.CommissionedMaterielDesc") <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
}}</view>
<view class="material-right-code">{{ every.materialDesc }}</view>
</view> </view>
</view> </view>
<!-- 需求数量 --> <!-- 需求数量 -->
<view class="number"> <view class="number">
<view class="number-left"> <view class="number-left">
<view class="number-left-title">{{ <view class="number-left-title">{{ $t('message.CommissionedDemandData') }}</view>
$t("message.CommissionedDemandData") <u-input v-model="every.orderAmount" placeholder=" " :type="type" :border="border" class="input" disabled />
}}</view>
<u-input
v-model="every.orderAmount"
placeholder=" "
:type="type"
:border="border"
class="input"
disabled
/>
</view> </view>
<view class="number-right"> <view class="number-right">
<view class="number-right-title">{{ <view class="number-right-title">{{ $t('message.CommissionedCumulativeData') }}</view>
$t("message.CommissionedCumulativeData") <u-input :placeholder="$t('message.po_PleaseInput')" v-model="every.outAmount" :type="type" :border="border" class="input" disabled />
}}</view>
<u-input
:placeholder="$t('message.po_PleaseInput')"
v-model="every.outAmount"
:type="type"
:border="border"
class="input"
disabled
/>
</view> </view>
</view> </view>
<!-- 库位 --> <!-- 库位 -->
<view class="library"> <view class="library">
<view class="library-left"> <view class="library-left">
<view>{{ $t("message.CommissionedLocation") }}</view> <view>{{ $t('message.CommissionedLocation') }}</view>
<jPicker <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode.value"
class="search"
:options="Location"
/>
</view> </view>
<view class="library-right"> <view class="library-right">
<view class="library-right-title">{{ <view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
$t("message.CommissionedThisNumber") <u-input :placeholder="$t('message.po_PleaseInput')" v-model="nowAmount" :type="type" :border="border" class="input" />
}}</view>
<u-input
:placeholder="$t('message.po_PleaseInput')"
v-model="nowAmount"
:type="type"
:border="border"
class="input"
/>
</view> </view>
</view> </view>
<!-- 添加 --> <!-- 添加 -->
<view class="add"> <view class="add">
<u-button type="primary" @click="Add">{{ <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
$t("message.product_add")
}}</u-button>
</view> </view>
<!-- 表格 --> <!-- 表格 -->
<u-table class="library-table"> <u-table class="library-table">
<u-tr class="u-tr"> <u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th> <u-th class="u-th">{{ $t('message.product_Location') }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th> <u-th class="u-th">{{ $t('message.product_Number') }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th> <u-th class="u-th">{{ $t('message.operation') }}</u-th>
</u-tr> </u-tr>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index"> <u-tr class="u-tr" v-for="(item, index) in list" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td> <u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.nowAmount }}</u-td> <u-td class="u-td">{{ item.nowAmount }}</u-td>
<u-td class="u-td"> <u-td class="u-td">
<div class="u-td" @click="deleteItem(index)"> <u-button type="error" size="small" class="u-td" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
{{ $t("message.product_Delete") }}
</div>
</u-td> </u-td>
</u-tr> </u-tr>
</u-table> </u-table>
@ -138,31 +78,25 @@
<view class="bottom-bar"> <view class="bottom-bar">
<u-row class="button-bar"> <u-row class="button-bar">
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="bill">{{ <u-button type="primary" @click="bill">{{ $t('message.CommissionedGoOutDetails') }}</u-button>
$t("message.CommissionedGoOutDetails")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="onSubmit">{{ <u-button type="primary" @click="onSubmit">{{ $t('message.product_Upload') }}</u-button>
$t("message.product_Upload")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="uni.navigateBack()">{{ <u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Ref } from "vue-property-decorator"; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import jPicker from "@/components/J-Picker/jPicker.vue"; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from "@/store/modules/session"; import { session } from '@/store/modules/session';
import { VForm, VFormRules } from "vue/types/form"; import { VForm, VFormRules } from 'vue/types/form';
import model from "./model"; import model from './model';
@Component({ @Component({
components: { components: {
jPicker, jPicker,
@ -171,27 +105,25 @@ import model from "./model";
export default class dnReceiptDom extends BasePage { export default class dnReceiptDom extends BasePage {
model = model; model = model;
form: any = { form: any = {
documentNo: "", documentNo: '',
}; };
material: any = {}; material: any = {};
materialList: any = []; materialList: any = [];
list: any = []; list: any = [];
every: any = ""; every: any = '';
value = ""; value = '';
type = "text"; type = 'text';
border = true; border = true;
nowAmount: any = ""; nowAmount: any = '';
// //
Location: any = []; Location: any = [];
// //
wlCode: any = ""; wlCode: any = '';
// //
async onReady() { async onReady() {
// //
let means: any = JSON.parse( let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
);
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = { let content = {
loginName: means.session.user.loginName, loginName: means.session.user.loginName,
sendSpot: sendSpot, sendSpot: sendSpot,
@ -199,23 +131,23 @@ export default class dnReceiptDom extends BasePage {
workArea: session.workareaCode, workArea: session.workareaCode,
}; };
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
console.log("////res",res); console.log('////res', res);
//undefinedres[[],[]],arry //undefinedres[[],[]],arry
//guoshuang undefined //guoshuang undefined
res.forEach((item: any) => { res.forEach((item: any) => {
let pickerName: any = {}; let pickerName: any = {};
pickerName.label = item.locationCode; pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")"; pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); this.Location.push(pickerName);
}); });
} }
// //
async query() { async query() {
if (this.form.documentNo == "") { if (this.form.documentNo == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips1") as any, title: this.$t('message.Commission_tips1') as any,
}); });
return; return;
} }
@ -229,7 +161,7 @@ export default class dnReceiptDom extends BasePage {
this.materialList.push(pickerName); this.materialList.push(pickerName);
}); });
this.every = this.material[0]; this.every = this.material[0];
console.log("materialList????", this.materialList); console.log('materialList????', this.materialList);
} }
// receiptAmount requestAmount // receiptAmount requestAmount
materialChoice(e: any) { materialChoice(e: any) {
@ -246,24 +178,24 @@ export default class dnReceiptDom extends BasePage {
} }
// //
Add() { Add() {
if (this.nowAmount == "" || this.wlCode == "") { if (this.nowAmount == '' || this.wlCode == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips2") as any, title: this.$t('message.Commission_tips2') as any,
}); });
return; return;
} }
if (parseFloat(this.nowAmount) <= 0) { if (parseFloat(this.nowAmount) <= 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips3") as any, title: this.$t('message.Commission_tips3') as any,
}); });
return; return;
} }
if (parseFloat(this.nowAmount) > this.every.orderAmount) { if (parseFloat(this.nowAmount) > this.every.orderAmount) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips4") as any, title: this.$t('message.Commission_tips4') as any,
}); });
return; return;
} }
@ -281,8 +213,8 @@ export default class dnReceiptDom extends BasePage {
async onSubmit() { async onSubmit() {
if (this.list == null || this.list.length == 0) { if (this.list == null || this.list.length == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Commission_tips5") as any, title: this.$t('message.Commission_tips5') as any,
}); });
} }
let upload = { let upload = {
@ -294,22 +226,20 @@ export default class dnReceiptDom extends BasePage {
}; };
await this.model.submitOutsourcing(upload); await this.model.submitOutsourcing(upload);
this.list = []; this.list = [];
this.wlCode = ""; this.wlCode = '';
this.nowAmount = ""; this.nowAmount = '';
this.every = ""; this.every = '';
this.materialList = []; this.materialList = [];
} }
async bill() { async bill() {
if (this.form.documentNo == "") { if (this.form.documentNo == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message._tips6") as any, title: this.$t('message._tips6') as any,
}); });
return; return;
} }
let person = JSON.parse( let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let content = { let content = {
loginName: person.session.user.loginName, loginName: person.session.user.loginName,
poNo: this.form.documentNo, poNo: this.form.documentNo,
@ -330,8 +260,7 @@ export default class dnReceiptDom extends BasePage {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-raw-receipt { .page-raw-receipt {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;

@ -36,7 +36,7 @@
<view class="material" <view class="material"
><view class="material-right"> ><view class="material-right">
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view> <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
<view class="material-right-code">{{ every.materialDesc }}</view> <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
</view> </view>
</view> </view>

@ -36,7 +36,7 @@
<view class="material" <view class="material"
><view class="material-right"> ><view class="material-right">
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view> <view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
<view class="material-right-code">{{ every.materialDesc }}</view> <view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
</view> </view>
</view> </view>

@ -19,7 +19,7 @@
</u-form-item> </u-form-item>
<!-- 物料描述 --> <!-- 物料描述 -->
<u-form-item :label="$t('message.po_MaterielDes')"> <u-form-item :label="$t('message.po_MaterielDes')">
<u-input :disabled="true" v-model="orderlist.productDescZh" placeholder="" /> <u-input :disabled="true" v-model="orderlist.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item> </u-form-item>
<!-- 出库库位 --> <!-- 出库库位 -->
<u-form-item :label="$t('message.Outbound')"> <u-form-item :label="$t('message.Outbound')">

Loading…
Cancel
Save