单位规则修改

jg-waiwang-pro
vayne 7 months ago
parent df306ed5ac
commit c6d73d9e30

@ -180,6 +180,7 @@
<result column="commodityName" property="commodityName"></result>
<result column="spec" property="spec"></result>
<result column="inventoryUnitId" property="inventoryUnitId"></result>
<result column="inventoryUnitId1" property="inventoryUnitId1"></result>
<result column="salesMainUnitId" property="salesMainUnitId"></result>
<result column="businessNum" property="businessNum"></result>
<result column="businessPrice" property="businessPrice"></result>
@ -497,13 +498,21 @@
a.product_id as productId,
a.commodity_name as commodityName,
a.specifications as spec,
a.inventory_unit_id as inventoryUnitId,
a.procure_unit as salesMainUnitId,
JgFnUnitName(b.inventory_unit_id) as inventoryUnitId1,
a.number as businessNum,
a.price_rate as businessPrice,
a.tax_rate as tax
a.tax_rate as tax,
a.total_rate as taxCount,
IF(
many_unit_flag = 1,
JgFnUnitName ( b.order_main_unit_id ),
JgFnUnitArrName ( b.order_main_unit_id )) AS orderMainUnitId1,
b.purchase_order_quantity_down as purchaseOrderQuantityDown,
b.purchase_order_quantity_upper as purchaseOrderQuantityUpper,
b.purchase_order_multiple as purchaseOrderMultiple
FROM
`jg_contract_commodity` a
LEFT JOIN jg_product b ON a.product_id = b.id and b.f_delete_mark is null
WHERE
a.f_delete_mark IS NULL
AND a.contract_id = #{id}
@ -520,7 +529,15 @@
a.procure_unit as salesMainUnitId,
a.number as businessNum,
a.price_rate as businessPrice,
a.tax_rate as tax
a.tax_rate as tax,
a.total_rate as taxCount,
IF(
many_unit_flag = 1,
JgFnUnitName ( b.order_main_unit_id ),
JgFnUnitArrName ( b.order_main_unit_id )) AS orderMainUnitId1,
b.purchase_order_quantity_down as purchaseOrderQuantityDown,
b.purchase_order_quantity_upper as purchaseOrderQuantityUpper,
b.purchase_order_multiple as purchaseOrderMultiple
FROM
jg_contract_commodity a
LEFT JOIN jg_product b ON a.product_id = b.id

@ -47,6 +47,9 @@ public class BusinessOrderForm {
/** 期望送达 **/
@JsonProperty("expectArriveDateStart")
private String expectArriveDateStart;
/** 期望送达 **/
@JsonProperty("expectArriveDateEnd")
private String expectArriveDateEnd;
/** 制单时间 **/
@JsonProperty("createOrderDate")
private String createOrderDate;

@ -17,6 +17,8 @@ public class ProductByContractModel {
private Object spec;
@JSONField(name = "inventoryUnitId")
private Object inventoryUnitId;
@JSONField(name = "inventoryUnitId1")
private Object inventoryUnitId1;
@JSONField(name = "salesMainUnitId")
private Object salesMainUnitId;
@JSONField(name = "businessNum")
@ -25,4 +27,14 @@ public class ProductByContractModel {
private Object businessPrice;
@JSONField(name = "tax")
private Object tax;
@JSONField(name = "taxCount")
private Object taxCount;
@JSONField(name = "orderMainUnitId1")
private Object orderMainUnitId1;
@JSONField(name = "purchaseOrderQuantityDown")
private Object purchaseOrderQuantityDown;
@JSONField(name = "purchaseOrderQuantityUpper")
private Object purchaseOrderQuantityUpper;
@JSONField(name = "purchaseOrderMultiple")
private Object purchaseOrderMultiple;
}

@ -1,7 +1,7 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="140px" label-position="right"
:disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
@ -59,12 +59,15 @@
</el-col>
<el-col :span="8" v-if="judgeShow('expectArriveDateStart')">
<jnpf-form-tip-item label="期望送达" v-if="judgeShow('expectArriveDateStart')" prop="expectArriveDateStart">
<JnpfDatePicker v-model="dataForm.expectArriveDateStart" @change="changeData('expectArriveDateStart', -1)"
<jnpf-form-tip-item label="期望送达时间" v-if="judgeShow('expectArriveDateStart')" prop="expectArriveDate">
<!-- <JnpfDatePicker v-model="dataForm.expectArriveDateStart" @change="changeData('expectArriveDateStart', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('expectArriveDateStart')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</JnpfDatePicker> -->
<el-date-picker v-model="dataForm.expectArriveDate" type="daterange" start-placeholder=""
end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('createOrderDate')">
@ -590,9 +593,9 @@
<h2></h2>
</div>
<el-table :data="dataForm.businessOrderProductRelationalList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('businessorderproductrelational-productId')"
prop="productId">
prop="productId" width="160" align="center" fixed="left">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-productId')">*</span>商品名称
@ -603,11 +606,12 @@
placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index" interfaceId="530009896687501829"
:pageSize="20" :columnOptions="businessorderproductrelationalproductIdcolumnOptions2" clearable
:style='{ "width": "100%" }'>
:style='{ "width": "100%" }' disabled>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('businessorderproductrelational-spec')" prop="spec">
<el-table-column label="规格" v-if="judgeShow('businessorderproductrelational-spec')" prop="spec"
width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-spec')">*</span>规格
@ -616,12 +620,12 @@
<JnpfInput v-model="scope.row.spec"
@change="changeData('businessorderproductrelational-spec', scope.$index)" placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-spec')"
clearable :style='{ "width": "100%" }'>
clearable :style='{ "width": "100%" }' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('businessorderproductrelational-inventoryUnitId')"
prop="inventoryUnitId">
prop="inventoryUnitId" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-inventoryUnitId')">*</span>库存单位
@ -631,12 +635,12 @@
@change="changeData('businessorderproductrelational-inventoryUnitId', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-inventoryUnitId')"
clearable :style='{ "width": "100%" }'>
clearable :style='{ "width": "100%" }' readonly>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存" v-if="judgeShow('businessorderproductrelational-realBound')"
prop="realBound">
prop="realBound" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-realBound')">*</span>实物库存
@ -650,7 +654,7 @@
</template>
</el-table-column>
<el-table-column label="可用库存" v-if="judgeShow('businessorderproductrelational-useBound')"
prop="useBound">
prop="useBound" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-useBound')">*</span>可用库存
@ -663,8 +667,22 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="日均销量" v-if="judgeShow('businessorderproductrelational-useBound')"
prop="useBound" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-useBound')">*</span>日均销量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useBound1"
@change="changeData('businessorderproductrelational-useBound', scope.$index)" placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-useBound')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="采购单位" v-if="judgeShow('businessorderproductrelational-salesMainUnitId')"
prop="salesMainUnitId">
prop="salesMainUnitId" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-salesMainUnitId')">*</span>采购单位
@ -675,13 +693,47 @@
placeholder="请选择"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-salesMainUnitId')"
clearable :style='{ "width": "100%" }'
:options="businessorderproductrelationalsalesMainUnitIdOptions"
:options="scope.row.businessorderproductrelationalsalesMainUnitIdOptions"
:props="businessorderproductrelationalsalesMainUnitIdProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="订货量限制" v-if="judgeShow('businessorderproductrelational-businessNum')"
prop="businessNum" width="250" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>订货量限制
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseOrderQuantityDown"
@change="changeData('businessorderproductrelational-businessNum', scope.$index)" placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-businessNum')"
clearable :style='{ "width": "40%" }'>
</JnpfInput>
<span></span>
<JnpfInput v-model="scope.row.purchaseOrderQuantityUpper"
@change="changeData('businessorderproductrelational-businessNum', scope.$index)" placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-businessNum')"
clearable :style='{ "width": "40%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="订货倍数" v-if="judgeShow('businessorderproductrelational-businessNum')"
prop="businessNum" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>订货倍数
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseOrderMultiple"
@change="changeData('businessorderproductrelational-businessNum', scope.$index)" placeholder="请输入"
:disabled="judgeWrite('businessorderproductrelationalList') || judgeWrite('businessorderproductrelationalList-businessNum')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="业务数量" v-if="judgeShow('businessorderproductrelational-businessNum')"
prop="businessNum">
prop="businessNum" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessNum')">*</span>业务数量
@ -695,7 +747,7 @@
</template>
</el-table-column>
<el-table-column label="业务单价" v-if="judgeShow('businessorderproductrelational-businessPrice')"
prop="businessPrice">
prop="businessPrice" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-businessPrice')">*</span>业务单价
@ -709,7 +761,8 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('businessorderproductrelational-tax')" prop="tax">
<el-table-column label="税率" v-if="judgeShow('businessorderproductrelational-tax')" prop="tax"
width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-tax')">*</span>税率
@ -723,7 +776,7 @@
</template>
</el-table-column>
<el-table-column label="含税小计" v-if="judgeShow('businessorderproductrelational-taxCount')"
prop="taxCount">
prop="taxCount" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-taxCount')">*</span>含税小计
@ -737,7 +790,7 @@
</template>
</el-table-column>
<el-table-column label="不含税单价" v-if="judgeShow('businessorderproductrelational-notTaxPrice')"
prop="notTaxPrice">
prop="notTaxPrice" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxPrice')">*</span>不含税单价
@ -751,7 +804,7 @@
</template>
</el-table-column>
<el-table-column label="不含税小计" v-if="judgeShow('businessorderproductrelational-notTaxCount')"
prop="notTaxCount">
prop="notTaxCount" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-notTaxCount')">*</span>不含税小计
@ -765,7 +818,7 @@
</template>
</el-table-column>
<el-table-column label="上一次采购单价" v-if="judgeShow('businessorderproductrelational-lastSalePrice')"
prop="lastSalePrice">
prop="lastSalePrice" width="120" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-lastSalePrice')">*</span>上一次采购单价
@ -779,7 +832,8 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50" v-if="!judgeWrite('businessorderproductrelationalList')">
<el-table-column label="操作" width="50" v-if="!judgeWrite('businessorderproductrelationalList')"
fixed="right" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbusinessorderproductrelationalList(scope.$index)">删除</el-button>
@ -915,6 +969,8 @@ export default {
counterpartOrderCode: undefined,
urgentOrder: "1",
expectArriveDateStart: undefined,
expectArriveDateEnd: undefined,
expectArriveDate: [],
createOrderDate: undefined,
deliveryType: undefined,
contractId: undefined,
@ -955,7 +1011,7 @@ export default {
trigger: 'change'
},
],
expectArriveDateStart: [
expectArriveDate: [
{
required: true,
message: '请选择',
@ -1121,6 +1177,7 @@ export default {
counterpartOrderCode: [],
urgentOrder: [],
expectArriveDateStart: [],
expectArriveDateEnd: [],
createOrderDate: [],
deliveryType: [],
contractId: [],
@ -1243,6 +1300,20 @@ export default {
val2.subjectbasicEntityList[0].subjectBasicId = val2.subjectbasicEntityList[0].id
val2.subjectbasicEntityList[0].businessType = '1'
this.dataForm.settlementInfoList = val2.subjectbasicEntityList
val2.productByContractModelList.forEach(item => {
item.inventoryUnitId = item.inventoryUnitId1
// item.salesMainUnitId = item.orderMainUnitId1
var aaa = JSON.parse(item.orderMainUnitId1)
var bbb = [];
for (let i = 0; i < aaa.length; i++) {
var opt = {};
opt.fullName = aaa[i];
opt.id = aaa[i];
bbb.push(opt);
}
item.businessorderproductrelationalsalesMainUnitIdOptions = bbb;
})
this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
},
getSupplyName(val, val2) {
@ -1566,12 +1637,24 @@ export default {
return timeDataValue;
},
dataList() {
if (this.dataForm.expectArriveDate && this.dataForm.expectArriveDate.length) {
this.dataForm.expectArriveDateStart = this.dataForm.expectArriveDate[0]
this.dataForm.expectArriveDateEnd = this.dataForm.expectArriveDate[1]
} else {
this.dataForm.expectArriveDateStart = ''
this.dataForm.expectArriveDateEnd = ''
}
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.dataForm.expectArriveDate = [];
if (this.dataForm.expectArriveDateStart && this.dataForm.expectArriveDateEnd) {
this.dataForm.expectArriveDate[0] = new Date(this.dataForm.expectArriveDateStart)
this.dataForm.expectArriveDate[1] = new Date(this.dataForm.expectArriveDateEnd)
}
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.settlementInfoList.length; i++) {

@ -77,7 +77,7 @@
{{ scope.row.purchaseOrder }}
</template>
</el-table-column>
<el-table-column prop="purchaseOrder" label="执行单据号" sortable align="center" width="160">
<el-table-column prop="purchaseOrder1" label="执行单据号" sortable align="center" width="160">
<template slot-scope="scope">
{{ scope.row.purchaseOrder }}
</template>

@ -1,7 +1,7 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="140px" label-position="right"
:disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
@ -59,12 +59,15 @@
</el-col>
<el-col :span="8" v-if="judgeShow('expectArriveDateStart')">
<jnpf-form-tip-item label="期望送达" v-if="judgeShow('expectArriveDateStart')" prop="expectArriveDateStart">
<JnpfDatePicker v-model="dataForm.expectArriveDateStart" @change="changeData('expectArriveDateStart', -1)"
<jnpf-form-tip-item label="期望送达时间" v-if="judgeShow('expectArriveDateStart')" prop="expectArriveDate">
<!-- <JnpfDatePicker v-model="dataForm.expectArriveDateStart" @change="changeData('expectArriveDateStart', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('expectArriveDateStart')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</JnpfDatePicker> -->
<el-date-picker v-model="dataForm.expectArriveDate" type="daterange" start-placeholder=""
end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('createOrderDate')">
@ -75,10 +78,10 @@
</JnpfOpenData>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryType')">
<el-col :span="9" v-if="judgeShow('deliveryType')">
<jnpf-form-tip-item label="配送方式" v-if="judgeShow('deliveryType')" prop="deliveryType">
<JnpfSelect v-model="dataForm.deliveryType" @change="changeData('deliveryType', -1)" placeholder="请选择"
:disabled="judgeWrite('deliveryType')" clearable :style='{ "width": "100%" }'
:disabled="judgeWrite('deliveryType')" clearable :style='{ "width": "86%" }'
:options="deliveryTypeOptions" :props="deliveryTypeProps">
</JnpfSelect>
</jnpf-form-tip-item>
@ -90,7 +93,7 @@
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('contractId')">
<el-col :span="6" v-if="judgeShow('contractId')">
<jnpf-form-tip-item label="关联合同" v-if="judgeShow('contractId')" prop="contractId">
<JnpfPopupSelect v-model="dataForm.contractId" @change="contractInfo" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.contractId" placeholder="请选择" propsValue="id"
@ -904,7 +907,9 @@ export default {
businessLineId: undefined,
counterpartOrderCode: undefined,
urgentOrder: "1",
expectArriveDate: [],
expectArriveDateStart: undefined,
expectArriveDateEnd: undefined,
createOrderDate: undefined,
deliveryType: "1",
contractId: undefined,
@ -937,6 +942,13 @@ export default {
trigger: 'change'
},
],
contractId: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
urgentOrder: [
{
required: true,
@ -944,7 +956,7 @@ export default {
trigger: 'change'
},
],
expectArriveDateStart: [
expectArriveDate: [
{
required: true,
message: '请选择',
@ -1096,6 +1108,7 @@ export default {
counterpartOrderCode: [],
urgentOrder: [],
expectArriveDateStart: [],
expectArriveDateEnd: [],
createOrderDate: [],
deliveryType: [],
contractId: [],
@ -1541,13 +1554,24 @@ export default {
return timeDataValue;
},
dataList() {
if (this.dataForm.expectArriveDate && this.dataForm.expectArriveDate.length) {
this.dataForm.expectArriveDateStart = this.dataForm.expectArriveDate[0]
this.dataForm.expectArriveDateEnd = this.dataForm.expectArriveDate[1]
} else {
this.dataForm.expectArriveDateStart = ''
this.dataForm.expectArriveDateEnd = ''
}
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.dataForm.expectArriveDate = [];
if (this.dataForm.expectArriveDateStart && this.dataForm.expectArriveDateEnd) {
this.dataForm.expectArriveDate[0] = new Date(this.dataForm.expectArriveDateStart)
this.dataForm.expectArriveDate[1] = new Date(this.dataForm.expectArriveDateEnd)
}
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.settlementInfoList.length; i++) {

Loading…
Cancel
Save