|
@@ -23,10 +23,11 @@
|
|
|
<h3>基本信息</h3>
|
|
|
</div>
|
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
|
- <ws-form-item label="标题" span="1" prop="title">
|
|
|
+ <ws-form-item label="标题" span="1" prop="title" >
|
|
|
<el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
+ <ws-form-item label="货名" span="1" prop="goodsName" >
|
|
|
<ws-select
|
|
|
v-model="dataList.goodsName"
|
|
|
placeholder
|
|
@@ -40,18 +41,21 @@
|
|
|
:value="item.constValue"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
|
|
|
+ <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume" >
|
|
|
<el-input
|
|
|
v-model="dataList.plannedPurchaseVolume"
|
|
|
class="typeselect"
|
|
|
placeholder="请输入计划采购量"
|
|
|
/>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
|
|
|
+ <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume" >
|
|
|
<el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="类型" span="1" prop="procurementPlanType">
|
|
|
+ <ws-form-item label="类型" span="1" prop="procurementPlanType" >
|
|
|
<ws-select
|
|
|
v-model="dataList.procurementPlanType"
|
|
|
placeholder
|
|
@@ -65,6 +69,7 @@
|
|
|
:value="item.constValue"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="价格类型" span="1" prop="priceType">
|
|
|
<el-input v-model="dataList.priceType" disabled />
|
|
@@ -76,6 +81,7 @@
|
|
|
prop="basisPrice"
|
|
|
>
|
|
|
<el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item
|
|
|
v-show="dataList.procurementPlanType=='现货'"
|
|
@@ -89,8 +95,9 @@
|
|
|
size="small"
|
|
|
placeholder="请输入采购价格"
|
|
|
/>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="收货库" span="1" prop="receiveWarehouse">
|
|
|
+ <ws-form-item label="收货库" span="1" prop="receiveWarehouse" >
|
|
|
<ws-select
|
|
|
v-model="dataList.receiveWarehouse"
|
|
|
placeholder
|
|
@@ -104,8 +111,9 @@
|
|
|
:value="item.warehouseName"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
|
|
|
+ <ws-form-item label="收货库所在地区" span="1" prop="receiveArea" >
|
|
|
<el-cascader
|
|
|
:options="options_"
|
|
|
v-model="selectedOptions"
|
|
@@ -115,6 +123,7 @@
|
|
|
@change="handleChange"
|
|
|
style="width:200%"
|
|
|
/>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="运费承担方" span="1" prop="freightPayer">
|
|
|
<ws-select
|
|
@@ -131,7 +140,7 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <ws-form-item label="包装方式" span="1" prop="packingType">
|
|
|
+ <ws-form-item label="包装方式" span="1" prop="packingType" >
|
|
|
<ws-select
|
|
|
v-model="dataList.packingType"
|
|
|
placeholder
|
|
@@ -145,6 +154,7 @@
|
|
|
:value="item.constValue"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
<el-form-item v-if="dataList.packingType!='散装'" label="装袋备注" span="1" prop="baggingNotes">
|
|
|
<el-input
|
|
@@ -154,10 +164,11 @@
|
|
|
placeholder="请输入装袋要求如:98斤,王中王彩袋"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <ws-form-item label="买方" span="1" prop="buyer">
|
|
|
+ <ws-form-item label="买方" span="1" prop="buyer" >
|
|
|
<el-input maxlength='25' v-model="dataList.buyer" size="small" placeholder="请输入买方名称" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
- <el-form-item label="买方电话" span="1" prop="buyerPhone">
|
|
|
+ <el-form-item label="买方电话" span="1" prop="buyerPhone" >
|
|
|
<el-input
|
|
|
v-model="dataList.buyerPhone"
|
|
|
filterable
|
|
@@ -165,6 +176,7 @@
|
|
|
:filter-method="dataFilter"
|
|
|
placeholder="请输入买方电话"
|
|
|
></el-input>
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</el-form-item>
|
|
|
<div class="small-title"></div>
|
|
|
</el-form>
|
|
@@ -174,11 +186,13 @@
|
|
|
<h3>货物要求</h3>
|
|
|
</div>
|
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
|
- <el-form-item label="水分(%)<=" span="1" prop="waterContent">
|
|
|
+ <el-form-item label="水分(%)<=" span="1" prop="waterContent" >
|
|
|
<el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
|
|
|
+ <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity" >
|
|
|
<el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
|
|
|
+ <span class="unchangeable">*</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
|
|
|
<el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
|
|
@@ -642,7 +656,7 @@ export default {
|
|
|
}
|
|
|
if (!this.dataList.minimumVolume) {
|
|
|
this.$message({
|
|
|
- message: '最小交易量不能为空!',
|
|
|
+ message: '最小成交量不能为空!',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
@@ -650,18 +664,55 @@ export default {
|
|
|
if (
|
|
|
this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
|
|
|
this.$message({
|
|
|
- message: '最小交易量输入错误!',
|
|
|
+ message: '最小成交量输入错误!',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (this.dataList.minimumVolume.indexOf('.') != -1 &&this.dataList.minimumVolume.split('.')[1].length >2) {
|
|
|
this.$message({
|
|
|
- message: '最小交易量输入错误!',
|
|
|
+ message: '最小成交量输入错误!',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (
|
|
|
+ this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
|
|
|
+ String(dataList.basisPrice).length -
|
|
|
+ (String(this.dataList.basisPrice).indexOf('.') + 1) >
|
|
|
+ 2||this.dataList.basisPrice>10000||this.dataList.basisPrice<1){
|
|
|
+ this.$message({
|
|
|
+ message: '基差输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dataList.procurementPrice > 100000 ||
|
|
|
+ this.dataList.procurementPrice < 0 ||
|
|
|
+ (String(this.dataList.procurementPrice).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.dataList.procurementPrice).length -
|
|
|
+ (String(this.dataList.procurementPrice).indexOf(
|
|
|
+ '.'
|
|
|
+ ) +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '采购价格输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.dataList.receiveWarehouse) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择收货库',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.dataList.buyer) {
|
|
|
this.$message({
|
|
|
message: '买方不能为空!',
|
|
@@ -714,6 +765,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.dataList.bulkDensity) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重不能为空!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
this.dataList.bulkDensity&&String(this.dataList.bulkDensity).indexOf('.') != -1 &&
|
|
|
String(this.dataList.bulkDensity).length -
|
|
@@ -729,7 +787,7 @@ export default {
|
|
|
this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
|
|
|
String(this.dataList.protein).length -
|
|
|
(String(this.dataList.protein).indexOf('.') + 1) >
|
|
|
- 2||this.dataList.protein>40||this.dataList.protein<1){
|
|
|
+ 2||this.dataList.protein>80||this.dataList.protein<1){
|
|
|
this.$message({
|
|
|
message: '蛋白占比输入错误',
|
|
|
type: 'warning'
|
|
@@ -739,7 +797,8 @@ export default {
|
|
|
if (
|
|
|
this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
|
|
|
String(this.dataList.impurity).length -
|
|
|
- (String(this.dataList.impurity).indexOf('.') + 1) >2) {
|
|
|
+ (String(this.dataList.impurity).indexOf('.') + 1) >2
|
|
|
+ ||this.dataList.impurity>40||this.dataList.impurity<1) {
|
|
|
this.$message({
|
|
|
message: '杂质输入错误',
|
|
|
type: 'warning'
|
|
@@ -750,7 +809,7 @@ export default {
|
|
|
this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
|
|
|
String(this.dataList.mildewGrain).length -
|
|
|
(String(this.dataList.mildewGrain).indexOf('.') + 1) >
|
|
|
- 2) {
|
|
|
+ 2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1) {
|
|
|
this.$message({
|
|
|
message: '霉变粒输入错误',
|
|
|
type: 'warning'
|
|
@@ -761,7 +820,7 @@ export default {
|
|
|
this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
|
|
|
String(this.dataList.jiaorenli).length -
|
|
|
(String(this.dataList.jiaorenli).indexOf('.') + 1) >
|
|
|
- 2) {
|
|
|
+ 2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1) {
|
|
|
this.$message({
|
|
|
message: '热损伤输入错误',
|
|
|
type: 'warning'
|
|
@@ -772,13 +831,14 @@ export default {
|
|
|
this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
|
|
|
String(this.dataList.imperfectGrain).length -
|
|
|
(String(this.dataList.imperfectGrain).indexOf('.') + 1) >
|
|
|
- 2) {
|
|
|
+ 2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1) {
|
|
|
this.$message({
|
|
|
message: '不完整粒输入错误',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
this.dataList.id = this.$route.query.id
|
|
|
this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
|
|
|
cancelButtonText: '取消',
|
|
@@ -799,7 +859,7 @@ export default {
|
|
|
this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
|
|
|
|
|
|
this.dataList.compId = this.compId
|
|
|
-
|
|
|
+ this.dataList.unitPrice=this.dataList.procurementPrice
|
|
|
|
|
|
// this.dataList.contractType = 1
|
|
|
// this.dataList.goodsType = 1
|
|
@@ -823,22 +883,6 @@ export default {
|
|
|
return false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- selectwarehouseName() {},
|
|
|
- tarechange(e) {
|
|
|
- if (this.dataList.grossWeight && this.dataList.tare) {
|
|
|
- this.dataList.netWeight = Number(
|
|
|
- this.dataList.grossWeight - this.dataList.tare
|
|
|
- )
|
|
|
- }
|
|
|
- },
|
|
|
- grossWeightchange(e) {
|
|
|
- if (this.dataList.grossWeight && this.dataList.tare) {
|
|
|
- this.dataList.netWeight = Number(
|
|
|
- this.dataList.grossWeight - this.dataList.tare
|
|
|
- )
|
|
|
- }
|
|
|
- },
|
|
|
selectgoodsName(e) {
|
|
|
for (var i = 0; i < this.goodnameList.length; i++) {
|
|
|
if (this.goodnameList[i].constValue == e) {
|
|
@@ -1113,16 +1157,20 @@ export default {
|
|
|
width: 400px;
|
|
|
height: 20px;
|
|
|
}
|
|
|
-.readonly :after {
|
|
|
- content: '*';
|
|
|
- color: #ff2727;
|
|
|
- position: absolute;
|
|
|
- right: 8px;
|
|
|
- z-index: 10;
|
|
|
- top: 21%;
|
|
|
- font-size: 20px;
|
|
|
-}
|
|
|
/deep/.typeselect .el-input__inner {
|
|
|
color: #8890b1;
|
|
|
}
|
|
|
+//*号
|
|
|
+.unchangeable {
|
|
|
+ position: absolute;
|
|
|
+ width: 9px;
|
|
|
+ height: 22px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #ff2727;
|
|
|
+ line-height: 22px;
|
|
|
+ display: inline-block;
|
|
|
+ right: -1px;
|
|
|
+}
|
|
|
</style>
|