修改输入提示
parent
ee684f737b
commit
74bcb3c194
|
@ -337,7 +337,7 @@ export const unitFormItems = reactive([
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请选择单位组')],
|
rules: [required('请选择单位组')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型',
|
placeholder: '请选择单位组',
|
||||||
options: [],
|
options: [],
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -352,7 +352,7 @@ export const unitFormItems = reactive([
|
||||||
type: 'a-select',
|
type: 'a-select',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型',
|
placeholder: '请选择基本单位',
|
||||||
options: [],
|
options: [],
|
||||||
disabled: true,
|
disabled: true,
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
|
@ -369,7 +369,7 @@ export const unitFormItems = reactive([
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请选择采购单位')],
|
rules: [required('请选择采购单位')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型',
|
placeholder: '请选择采购单位',
|
||||||
options: [],
|
options: [],
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -385,7 +385,7 @@ export const unitFormItems = reactive([
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请选择分销单位')],
|
rules: [required('请选择分销单位')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入分销单位',
|
||||||
options: [],
|
options: [],
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -401,7 +401,7 @@ export const unitFormItems = reactive([
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请选择生产单位')],
|
rules: [required('请选择生产单位')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入生产单位',
|
||||||
options: [],
|
options: [],
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -433,7 +433,7 @@ export const unitFormItems = reactive([
|
||||||
rules: [required('请选择库存单位')],
|
rules: [required('请选择库存单位')],
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入库存单位',
|
||||||
options: [],
|
options: [],
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -499,7 +499,7 @@ export const priceFormItems = [
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请输入采购价格')],
|
rules: [required('请输入采购价格')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入生产价格'
|
placeholder: '请输入采购价格'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -509,7 +509,7 @@ export const priceFormItems = [
|
||||||
span: 6,
|
span: 6,
|
||||||
rules: [required('请输入统一零售价')],
|
rules: [required('请输入统一零售价')],
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入生产价格'
|
placeholder: '请输入统一零售价'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -185,12 +185,12 @@ export const viewFormItems = reactive([
|
||||||
{
|
{
|
||||||
label: '详细地址:',
|
label: '详细地址:',
|
||||||
name: 'address',
|
name: 'address',
|
||||||
span: 1,
|
span: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注:',
|
label: '备注:',
|
||||||
name: 'remarks',
|
name: 'remarks',
|
||||||
span: 1,
|
span: 1
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型'
|
placeholder: '请选择联系人'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型'
|
placeholder: '请选择手机'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -219,7 +219,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型'
|
placeholder: '请选择固话'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请选择类型'
|
placeholder: '请选择传真'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -237,7 +237,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入电子邮箱',
|
||||||
allowClear: true
|
allowClear: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -247,7 +247,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入QQ',
|
||||||
allowClear: true
|
allowClear: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -257,7 +257,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入微信',
|
||||||
allowClear: true
|
allowClear: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -267,7 +267,7 @@ export const baseFormItems = [
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
span: 6,
|
span: 6,
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入联系地址',
|
||||||
allowClear: true
|
allowClear: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ export const baseFormViewItems = [
|
||||||
{
|
{
|
||||||
label: '联系人:',
|
label: '联系人:',
|
||||||
name: 'contacts',
|
name: 'contacts',
|
||||||
span: 1,
|
span: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机:',
|
label: '手机:',
|
||||||
|
|
|
@ -70,6 +70,13 @@
|
||||||
@click="openMateriel(record, index)"
|
@click="openMateriel(record, index)"
|
||||||
></a-input>
|
></a-input>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'batchNumber'">
|
||||||
|
<a-input
|
||||||
|
:disabled="route.query.type === 'SEARCH'"
|
||||||
|
v-model:value="record['batchNumber']"
|
||||||
|
placeholder="请填写批次号"
|
||||||
|
></a-input>
|
||||||
|
</template>
|
||||||
<template v-if="column.dataIndex === 'unitName'">
|
<template v-if="column.dataIndex === 'unitName'">
|
||||||
<a-select
|
<a-select
|
||||||
@change="handleSelectUnit($event, record)"
|
@change="handleSelectUnit($event, record)"
|
||||||
|
@ -88,6 +95,7 @@
|
||||||
:disabled="route.query.type === 'SEARCH'"
|
:disabled="route.query.type === 'SEARCH'"
|
||||||
v-model:value="record['planAmount']"
|
v-model:value="record['planAmount']"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
@change="changeAmount($event, record)"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
|
@ -105,20 +113,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="taskDetail">
|
<script setup name="taskDetail">
|
||||||
import inventoryInvoiceApi from '@/api/inventory/inventoryInvoiceApi'
|
import inventoryInvoiceApi from '@/api/inventory/inventoryInvoiceApi'
|
||||||
import sysStoreApi from '@/api/base/store/sysStoreApi'
|
import sysStoreApi from '@/api/base/store/sysStoreApi'
|
||||||
import materialApi from '@/api/base/material/materialApi'
|
import materialApi from '@/api/base/material/materialApi'
|
||||||
import useFormHandler from '@/hook/useFormHandler'
|
import useFormHandler from '@/hook/useFormHandler'
|
||||||
import {
|
import {
|
||||||
basicInfoFormItems,
|
basicInfoFormItems,
|
||||||
basicInfoFormRules,
|
basicInfoFormRules,
|
||||||
productDetailFormItems
|
productDetailFormItems
|
||||||
} from '@/views/productionBusiness/inventory/invoice/formFields/detailFields'
|
} from '@/views/productionBusiness/inventory/invoice/formFields/detailFields'
|
||||||
import {useRoute} from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import MaterielSelectorPlus from '@/components/Selector/materielSelectorPlus.vue'
|
import MaterielSelectorPlus from '@/components/Selector/materielSelectorPlus.vue'
|
||||||
import ClientSelectorPlus from '@/components/Selector/clientSelectorPlus.vue'
|
import ClientSelectorPlus from '@/components/Selector/clientSelectorPlus.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const formRef1 = ref(null)
|
const formRef1 = ref(null)
|
||||||
let extendData = ref([])
|
let extendData = ref([])
|
||||||
|
@ -144,7 +152,7 @@ const route = useRoute()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if(route.query.type === 'EDIT') {
|
if (route.query.type === 'EDIT') {
|
||||||
// 获取明细列表
|
// 获取明细列表
|
||||||
productDetailData.value = await inventoryInvoiceApi.inventoryInvoiceDetailList({
|
productDetailData.value = await inventoryInvoiceApi.inventoryInvoiceDetailList({
|
||||||
invoiceId: formRefs.value.id
|
invoiceId: formRefs.value.id
|
||||||
|
@ -171,12 +179,28 @@ const route = useRoute()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSelectUnit = (value, record) => {
|
const handleSelectUnit = (value, record) => {
|
||||||
record.unitName = record.unitArr.filter(item => item.id === value)[0].name
|
const unitObj = record.unitArr.filter((item) => item.id === value)[0]
|
||||||
|
record.unitName = unitObj.name
|
||||||
|
record.barcodeType = unitObj.type
|
||||||
|
record.barcodeTypeNumber = unitObj.number
|
||||||
|
|
||||||
|
if(record.planAmount) {
|
||||||
|
record.basicPlanAmount = parseFloat(record.planAmount * parseFloat(unitObj.unitRate)).toFixed(2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeAmount = (value, record) => {
|
||||||
|
let unitRate = 0
|
||||||
|
// 计划数量 * 单位换算率 = 计划基本数量
|
||||||
|
if (record.unitArr.length > 0) {
|
||||||
|
unitRate = parseFloat(record.unitArr.filter((item) => record.unitId === item.id)[0].unitRate)
|
||||||
|
record.basicPlanAmount = parseFloat(value * unitRate).toFixed(2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 根据单位计算发货数量,基本计划数量,基本发货数量
|
* 根据单位计算发货数量,基本计划数量,基本发货数量
|
||||||
* */
|
* */
|
||||||
|
|
||||||
/* 物料选择器 */
|
/* 物料选择器 */
|
||||||
const materielSelectorPlusRef = ref(null)
|
const materielSelectorPlusRef = ref(null)
|
||||||
|
@ -191,8 +215,6 @@ const route = useRoute()
|
||||||
|
|
||||||
// 物料选择器返回操作
|
// 物料选择器返回操作
|
||||||
const materielBackOk = async (event) => {
|
const materielBackOk = async (event) => {
|
||||||
productDetailData.value[materielIndex].batchNumber = event.materielSelectedRows[0].batchNumber
|
|
||||||
|
|
||||||
// 产品
|
// 产品
|
||||||
productDetailData.value[materielIndex].productId = event.materielSelectedRows[0].id
|
productDetailData.value[materielIndex].productId = event.materielSelectedRows[0].id
|
||||||
productDetailData.value[materielIndex].productName = event.materielSelectedRows[0].name
|
productDetailData.value[materielIndex].productName = event.materielSelectedRows[0].name
|
||||||
|
@ -201,7 +223,7 @@ const route = useRoute()
|
||||||
productDetailData.value[materielIndex].packageProportion = event.materielSelectedRows[0].packageProportion
|
productDetailData.value[materielIndex].packageProportion = event.materielSelectedRows[0].packageProportion
|
||||||
productDetailData.value[materielIndex].baseUnitName = event.materielSelectedRows[0].baseUnitName
|
productDetailData.value[materielIndex].baseUnitName = event.materielSelectedRows[0].baseUnitName
|
||||||
productDetailData.value[materielIndex].baseUnitId = event.materielSelectedRows[0].baseUnitId
|
productDetailData.value[materielIndex].baseUnitId = event.materielSelectedRows[0].baseUnitId
|
||||||
productDetailData.value[materielIndex].batchNumber = event.materielSelectedRows[0].batchNumber // 批次号
|
// productDetailData.value[materielIndex].basicPlanAmount = event.materielSelectedRows[0].basicPlanAmount // 批次号
|
||||||
|
|
||||||
// productDetailData.value[materielIndex].planAmount = event.materielSelectedRows[0].planAmount
|
// productDetailData.value[materielIndex].planAmount = event.materielSelectedRows[0].planAmount
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue