|
@@ -18,17 +18,14 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="basicInformation">
|
|
|
- <!-- <el-radio-group @change="tasktypechange" v-model="dataList.taskTypeKey"></el-radio-group> -->
|
|
|
<div class="center1">
|
|
|
<div class="small-title">
|
|
|
<h3>基本信息</h3>
|
|
|
</div>
|
|
|
- <el-form ref="dataList" :model="dataList" label-width="140px">
|
|
|
- <!-- 标题 -->
|
|
|
+ <el-form ref="dataList" :model="dataList" label-width="140px">
|
|
|
<ws-form-item label="标题" span="1" prop="title">
|
|
|
<el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
|
|
|
</ws-form-item>
|
|
|
- <!-- 货名 -->
|
|
|
<ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
<ws-select
|
|
|
v-model="dataList.goodsName"
|
|
@@ -44,7 +41,6 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!-- 计划采购量(吨) -->
|
|
|
<ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
|
|
|
<el-input
|
|
|
v-model="dataList.plannedPurchaseVolume"
|
|
@@ -52,11 +48,9 @@
|
|
|
placeholder="请输入计划采购量"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!-- 最小成交量 -->
|
|
|
<ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
|
|
|
<el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
|
|
|
</ws-form-item>
|
|
|
- <!--类型-->
|
|
|
<ws-form-item label="类型" span="1" prop="procurementPlanType">
|
|
|
<ws-select
|
|
|
v-model="dataList.procurementPlanType"
|
|
@@ -72,12 +66,10 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!-- 价格类型 -->
|
|
|
- <ws-form-item label="价格类型" span="1" prop="priceType">
|
|
|
+ <ws-form-item label="价格类型" span="1" prop="priceType">
|
|
|
<el-input v-model="dataList.priceType" disabled />
|
|
|
</ws-form-item>
|
|
|
- <!-- 基差 -->
|
|
|
- <ws-form-item
|
|
|
+ <ws-form-item
|
|
|
v-show="dataList.procurementPlanType=='期货'"
|
|
|
label="基差(元/吨)"
|
|
|
span="1"
|
|
@@ -85,7 +77,6 @@
|
|
|
>
|
|
|
<el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
|
|
|
</ws-form-item>
|
|
|
- <!--采购价格(元)-->
|
|
|
<ws-form-item
|
|
|
v-show="dataList.procurementPlanType=='现货'"
|
|
|
label="采购价格(元)"
|
|
@@ -99,23 +90,21 @@
|
|
|
placeholder="请输入采购价格"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!--收货库-->
|
|
|
<ws-form-item label="收货库" span="1" prop="receiveWarehouse">
|
|
|
- <el-select
|
|
|
+ <ws-select
|
|
|
v-model="dataList.receiveWarehouse"
|
|
|
- maxlength="120"
|
|
|
- size="small"
|
|
|
- placeholder="请选择收货库"
|
|
|
+ placeholder
|
|
|
+ class="typeselect"
|
|
|
@change="sendWarehousechange"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- v-for="item in warehouseList"
|
|
|
- :key="item.constKey"
|
|
|
+ >
|
|
|
+ <ws-option
|
|
|
+ v-for="item in warehouseList"
|
|
|
+ :key="item.warehouseName"
|
|
|
:label="item.warehouseName"
|
|
|
:value="item.warehouseName"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
+ </ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--收货库所在地区-->
|
|
|
<ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
|
|
|
<el-cascader
|
|
|
:options="options_"
|
|
@@ -127,7 +116,6 @@
|
|
|
style="width:200%"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!--运费承担方-->
|
|
|
<ws-form-item label="运费承担方" span="1" prop="freightPayer">
|
|
|
<ws-select
|
|
|
v-model="dataList.freightPayer"
|
|
@@ -143,7 +131,6 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--包装方式-->
|
|
|
<ws-form-item label="包装方式" span="1" prop="packingType">
|
|
|
<ws-select
|
|
|
v-model="dataList.packingType"
|
|
@@ -159,19 +146,16 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--装袋备注=-->
|
|
|
- <el-form-item label="装袋备注" span="1" prop="baggingNotes">
|
|
|
+ <el-form-item v-if="dataList.packingType!='散装'" label="装袋备注" span="1" prop="baggingNotes">
|
|
|
<el-input
|
|
|
v-model="dataList.baggingNotes"
|
|
|
size="small"
|
|
|
placeholder="请输入装袋要求如:98斤,王中王彩袋"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <!-- 买方 -->
|
|
|
<ws-form-item label="买方" span="1" prop="buyer">
|
|
|
<el-input v-model="dataList.buyer" maxlength="120" size="small" placeholder="请输入买方名称" />
|
|
|
</ws-form-item>
|
|
|
- <!-- 买方电话 -->
|
|
|
<el-form-item label="买方电话" span="1" prop="buyerPhone">
|
|
|
<el-input
|
|
|
v-model="dataList.buyerPhone"
|
|
@@ -191,32 +175,24 @@
|
|
|
<el-form-item label="水分(%)<=" span="1" prop="waterContent">
|
|
|
<el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <!-- 容重 -->
|
|
|
<el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
|
|
|
<el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
|
|
|
</el-form-item>
|
|
|
- <!-- 热损伤 -->
|
|
|
<el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
|
|
|
<el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
|
|
|
</el-form-item>
|
|
|
- <!-- 杂质 -->
|
|
|
<el-form-item label="杂质(%)<=" span="1" prop="impurity">
|
|
|
<el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
|
|
|
</el-form-item>
|
|
|
- <!-- 霉变粒 -->
|
|
|
<el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
|
|
|
<el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" />
|
|
|
</el-form-item>
|
|
|
- <!--不完善粒(%)<=-->
|
|
|
<el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
|
|
|
<el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" />
|
|
|
</el-form-item>
|
|
|
- <!-- 蛋白(%)<= -->
|
|
|
<el-form-item label="蛋白(%)<=" span="1" prop="protein">
|
|
|
<el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
|
|
|
</el-form-item>
|
|
|
- <!--粒型-->
|
|
|
<ws-form-item label="粒型" span="1" prop="grain">
|
|
|
<ws-select
|
|
|
v-model="dataList.grain"
|
|
@@ -232,7 +208,6 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--品级-->
|
|
|
<ws-form-item label="品级" span="1" prop="grade">
|
|
|
<ws-select
|
|
|
v-model="dataList.grade"
|
|
@@ -248,10 +223,9 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
- <!--产地-->
|
|
|
<ws-form-item label="产地" span="1" prop="unitPrice">
|
|
|
<el-cascader
|
|
|
- :options="options_"
|
|
|
+ :options="options1_"
|
|
|
v-model="selectedOptions1"
|
|
|
clearable
|
|
|
size="large"
|
|
@@ -260,33 +234,16 @@
|
|
|
style="width:200%"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
- <!--产出年份-->
|
|
|
<el-form-item label="产出年份" span="1" prop="outputYear">
|
|
|
<el-date-picker
|
|
|
v-model="dataList.outputYear"
|
|
|
- type="daterange"
|
|
|
+ type="year"
|
|
|
align="right"
|
|
|
unlink-panels
|
|
|
range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
+ placeholder="开始日期"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="产出年份" span="1" prop="outputYear">
|
|
|
- <el-select v-model="searchTypeText"
|
|
|
- :value="searchType"
|
|
|
- @change="selecttaskType"
|
|
|
- size="small"
|
|
|
- placeholder="请选择年份"
|
|
|
- />
|
|
|
- <ws-option
|
|
|
- v-for="item in taskTypeList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value"
|
|
|
- style="color: #8890b1"
|
|
|
- />
|
|
|
- </el-form-item>-->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -298,7 +255,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { procurementAdd } from '@/model/purchasingManagement/index'
|
|
|
-import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
|
|
|
+import { regionData,provinceAndCityDataPlus, CodeToText, TextToCode } from 'element-china-area-data'
|
|
|
import { pullDown } from '@/model/warehouse/index'
|
|
|
import { packList } from '@/model/contarct/index'
|
|
|
import { getwarehousename } from '@/model/tasksport/index'
|
|
@@ -324,22 +281,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['dataList'])
|
|
|
+
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
//弹出框
|
|
|
dialogViewSpareMoney: false,
|
|
|
dialogApproveFormVisible: false,
|
|
|
- // 船舶类型
|
|
|
- monetaryKey: null,
|
|
|
- // 表格显示数据
|
|
|
- tableDate: [],
|
|
|
// 是否显示
|
|
|
showType: true,
|
|
|
// 年
|
|
|
year: '',
|
|
|
options_: regionData,
|
|
|
+ options1_:provinceAndCityDataPlus,
|
|
|
packingTypeList: '',
|
|
|
procurementPlanTypeList: '',
|
|
|
freightPayerList: '',
|
|
@@ -352,7 +306,6 @@ export default {
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
searchType: 1,
|
|
|
- warehouseList1: [],
|
|
|
searchKeyWord: '',
|
|
|
radio: '1',
|
|
|
contractType: 2,
|
|
@@ -403,8 +356,8 @@ export default {
|
|
|
},
|
|
|
contractList: [],
|
|
|
inOutTaskNo: '',
|
|
|
- dataList: { taskTypeKey: '1' },
|
|
|
- dataList1: { taskTypeKey: '1' },
|
|
|
+ dataList: { taskTypeKey: '1',goodsName:'玉米',goodsNameKey:1,procurementPlanType:'现货',procurementPlanTypeKey:2,priceType:'定价采购',priceTypeKey:2,packingType:'散装',
|
|
|
+ packingTypeKey:1 },
|
|
|
historyList: [],
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: time => {
|
|
@@ -526,6 +479,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
selectprocurementPlanType(e) {
|
|
|
+ if(e=='现货'){
|
|
|
+ this.dataList.priceType='定价采购'
|
|
|
+ this.dataList.priceTypeKey=2
|
|
|
+ }else{
|
|
|
+ this.dataList.priceType='期货盘面价+基差'
|
|
|
+ this.dataList.priceTypeKey=1
|
|
|
+ }
|
|
|
for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
|
|
|
if (this.procurementPlanTypeList[i].constValue == e) {
|
|
|
this.dataList.procurementPlanTypekey = this.procurementPlanTypeList[
|
|
@@ -574,17 +534,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- submit() {
|
|
|
- if (this.outputYear) {
|
|
|
- this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
|
|
|
- this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
|
|
|
- } else {
|
|
|
- this.startDate = ''
|
|
|
- this.endDate = ''
|
|
|
- }
|
|
|
-
|
|
|
- // this.getList()
|
|
|
- },
|
|
|
//关闭
|
|
|
close() {
|
|
|
this.$router.push({ path: 'procurementPlanList' })
|
|
@@ -592,11 +541,12 @@ export default {
|
|
|
|
|
|
loaddata() {
|
|
|
getwarehousename({
|
|
|
- compId: this.compId
|
|
|
- // warehouseType: this.dataList.warehouseType,
|
|
|
+ compId: this.compId,
|
|
|
+ warehouseType: 1,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
|
+ console.log(response)
|
|
|
this.warehouseList = response
|
|
|
})
|
|
|
// 货名
|
|
@@ -651,6 +601,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (this.dataList.title.length>16) {
|
|
|
+ this.$message({
|
|
|
+ message: '标题输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.dataList.plannedPurchaseVolume) {
|
|
|
this.$message({
|
|
|
message: '计划采购量不能为空',
|
|
@@ -658,6 +615,22 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (this.dataList.plannedPurchaseVolume>1000000||this.dataList.plannedPurchaseVolume>1) {
|
|
|
+ this.$message({
|
|
|
+ message: '计划采购量输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.dataList.plannedPurchaseVolume.indexOf('.')) {
|
|
|
+ if(this.dataList.plannedPurchaseVolume.split('.')[1].length>2){
|
|
|
+ this.$message({
|
|
|
+ message: '计划采购量输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
if (
|
|
|
!this.dataList.minimumVolume ||
|
|
|
(String(this.dataList.minimumVolume).indexOf('.') != -1 &&
|
|
@@ -1010,7 +983,6 @@ export default {
|
|
|
position: relative;
|
|
|
top: 50px;
|
|
|
width: 40%;
|
|
|
- height: 2000px;
|
|
|
margin: 0 auto;
|
|
|
margin-right: 180px;
|
|
|
}
|