12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217 |
- // 编辑采购计划
- <template>
- <div class="container">
- <el-row>
- <el-col :span="12">
- <h2 class="bg-left title">编辑采购计划</h2>
- </el-col>
- <el-col :span="12" class="bg-right">
- <el-button
- class="bg-bottom"
- type="primary"
- size="small"
- @click="returnsales()"
- >
- <img
- width="6"
- height="10"
- style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png"
- alt
- />返回
- </el-button>
- </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">
- <!-- 标题 -->
- <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
- disabled
- v-model="dataList.goodsName"
- placeholder
- class="typeselect"
- @change="selectgoodsName"
- >
- <ws-option
- v-for="item in goodnameList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!-- 计划采购量(吨) -->
- <ws-form-item
- label="计划采购量(吨)"
- span="1"
- prop="plannedPurchaseVolume"
- >
- <el-input
- v-model="dataList.plannedPurchaseVolume"
- class="typeselect"
- 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
- disabled
- v-model="dataList.procurementPlanType"
- placeholder
- class="typeselect"
- @change="selectprocurementPlanType"
- >
- <ws-option
- v-for="item in procurementPlanTypeList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!-- 价格类型 -->
- <ws-form-item label="价格类型" span="1" prop="priceType">
- <el-input v-model="dataList.priceType" disabled />
- </ws-form-item>
- <!-- 基差 -->
- <ws-form-item
- v-show="dataList.procurementPlanType == '期货'"
- label="基差(元/吨)"
- span="1"
- prop="basisPrice"
- >
- <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
- </ws-form-item>
- <!--采购价格(元)-->
- <ws-form-item
- v-show="dataList.procurementPlanType == '现货'"
- label="采购价格(元)"
- span="1"
- prop="procurementPrice"
- >
- <el-input
- v-model="dataList.procurementPrice"
- maxlength="120"
- size="small"
- placeholder="请输入采购价格"
- />
- </ws-form-item>
- <!--收货库-->
- <ws-form-item label="收货库" span="1" prop="receiveWarehouse">
- <el-select
- disabled
- v-model="dataList.receiveWarehouse"
- maxlength="120"
- size="small"
- />
- <el-option
- v-for="item in warehouseList1"
- :key="item.constKey"
- :label="item.warehouseName"
- :value="item.warehouseName"
- ></el-option>
- </ws-form-item>
- <!--收货库所在地区-->
- <ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
- <el-cascader
- :options="options_"
- v-model="selectedOptions"
- clearable
- size="large"
- placeholder="请选择收货库所在地区"
- @change="handleChange"
- style="width: 200%"
- />
- </ws-form-item>
- <!--运费承担方-->
- <ws-form-item label="运费承担方" span="1" prop="freightPayer">
- <ws-select
- v-model="dataList.freightPayer"
- placeholder
- class="typeselect"
- @change="selectfreightPayer"
- >
- <ws-option
- v-for="item in freightPayerList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!--包装方式-->
- <ws-form-item label="包装方式" span="1" prop="packingType">
- <ws-select
- v-model="dataList.packingType"
- placeholder
- class="typeselect"
- @change="selectpackingType"
- >
- <ws-option
- v-for="item in packingTypeList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!--装袋备注=-->
- <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"
- filterable
- :filter-method="dataFilter"
- placeholder="请输入买方电话"
- ></el-input>
- </el-form-item>
- <div class="small-title"></div>
- </el-form>
- </div>
- <div class="center1">
- <div class="small-title">
- <h3>货物要求</h3>
- </div>
- <el-form ref="dataList" :model="dataList" label-width="140px">
- <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"
- placeholder
- class="typeselect"
- @change="selectgrain"
- >
- <ws-option
- v-for="item in grainList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!--品级-->
- <ws-form-item label="品级" span="1" prop="grade">
- <ws-select
- v-model="dataList.grade"
- placeholder
- class="typeselect"
- @change="selectgrade"
- >
- <ws-option
- v-for="item in gradeList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </ws-form-item>
- <!--产地-->
- <ws-form-item label="产地" span="1" prop="unitPrice">
- <el-cascader
- :options="options1_"
- v-model="selectedOptions1"
- clearable
- size="large"
- placeholder="请选择产地"
- @change="handleChange1"
- style="width: 200%"
- />
- </ws-form-item>
- <!--产出年份-->
- <el-form-item label="产出年份" span="1" prop="outputYear">
- <el-date-picker
- v-model="dataList.outputYear"
- type="year"
- align="right"
- unlink-panels
- range-separator="至"
- placeholder="产出年份"
- ></el-date-picker>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <!-- 提交 -->
- <div style="text-align: right; padding: 10px" class="center">
- <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
- >提交</el-button
- >
- </div>
- </div>
- </template>
- <script>
- import {
- procurementLook,
- procurementEdit,
- } from '@/model/purchasingManagement/index'
- import {
- regionData,
- CodeToText,
- TextToCode,
- provinceAndCityData,
- } from 'element-china-area-data'
- import { packList } from '@/model/contarct/index'
- import Pagination from '@/components/Pagination'
- import { mapActions, mapGetters, mapState } from 'vuex'
- import WsUpload from '@/components/WsUpload'
- // import { dayjs, fmoney, EventBus } from 'base-core-lib'
- import { dayjs, EventBus } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- },
- watch: {
- // vesselId(val) {
- // this.getList()
- // },
- isShow(val) {
- this.showType = val
- },
- },
- computed: {
- ...mapGetters(['dataList']),
- },
- data() {
- return {
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- options1_: provinceAndCityData,
- options_: regionData,
- packingTypeList: '',
- procurementPlanTypeList: '',
- freightPayerList: '',
- searchTypeText: '',
- selectedOptions: [],
- selectedOptions1: [],
- contractNoList: [],
- deptBudgetTotal: 0,
- readonly: true,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- warehouseList1: [],
- searchKeyWord: '',
- radio: '1',
- contractType: 2,
- startDate: null,
- endDate: null,
- goodnameList: {},
- grainList: [],
- checked: true,
- form: {},
- pcFlag: 1,
- staffList: [],
- options: [],
- storageType: [],
- storageType1: [],
- outContractNo: [],
- // 提交类型
- submitType: true,
- status: [],
- unitPricechange: [],
- warehouseNameList: [],
- warehouseNameList1: [],
- waterContentchange: [],
- appendixIdsAdd: '',
- uploadSuccess: {},
- warehouseInOutDetail: {},
- onChange: {},
- deptBudgetList1: [],
- gradeList: [],
- rules: {
- netWeight: [
- {
- required: true,
- type: 'number',
- message: '请输入活动名称',
- trigger: 'blur',
- },
- ],
- },
- outputYear: [],
- size: 10,
- compId: sessionStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- packtypeList: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- contractList: [],
- inOutTaskNo: '',
- dataList: { taskTypeKey: '1' },
- dataList1: { taskTypeKey: '1' },
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- }
- },
- activated() {
- this.loaddata()
- this.showType = this.isShow
- },
- mounted() {},
- methods: {
- //返回按钮
- revert() {
- this.$router.go(-1)
- },
- returnsales() {
- this.dataList = {}
- // this.selectedOptions = ''
- this.$router.go(-1)
- },
- // 获取当前年月日
- getdate() {
- var date = new Date()
- var year = date.getFullYear() //获取完整的年份(4位)
- var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
- var datetime = date.getDate() //获取当前日(1-31)
- if (mouth < 10) {
- mouth = '0' + mouth
- }
- if (datetime < 10) {
- datetime = '0' + datetime
- }
- return year + mouth + datetime
- },
- // 随机验证码
- verifyinit() {
- var arr = []
- for (var i = 48; i < 123; i++) {
- if (i > 57 && i < 65) continue
- if (i > 90 && i < 97) continue
- arr.push(String.fromCharCode(i))
- }
- arr.sort(function () {
- return Math.random() - 0.5
- })
- arr.length = 4
- return arr.join('')
- },
- dataFilter(val) {
- // console.log(val,"名")
- this.deptBudgetList.staffList = val
- if (val) {
- //val存在
- this.options = this.staffList.filter((item) => {
- if (
- !!~item.staffName.indexOf(val) ||
- !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options = this.staffList
- }
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- },
- selectstaff(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.dataList.agentKey = this.staffList[i].staffId
- }
- }
- },
- selectstaff1(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.dataList1.agentKey = this.staffList[i].staffId
- }
- }
- },
- selectgrain(e) {
- for (var i = 0; i < this.grainList.length; i++) {
- if (this.grainList[i].constValue == e) {
- this.dataList.grainKey = this.grainList[i].constKey
- }
- }
- },
- selectpackingType(e) {
- for (var i = 0; i < this.packingTypeList.length; i++) {
- if (this.packingTypeList[i].constValue == e) {
- this.dataList.packingTypeKey = this.packingTypeList[i].constKey
- }
- }
- },
- selectfreightPayer(e) {
- for (var i = 0; i < this.freightPayerList.length; i++) {
- if (this.freightPayerList[i].constValue == e) {
- this.dataList.freightPayerKey = this.freightPayerList[i].constKey
- }
- }
- },
- selectgrade(e) {
- for (var i = 0; i < this.gradeList.length; i++) {
- if (this.gradeList[i].constValue == e) {
- this.dataList.gradeKey = this.gradeList[i].constKey
- }
- }
- },
- selectprocurementPlanType(e) {
- for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
- if (this.procurementPlanTypeList[i].constValue == e) {
- this.dataList.procurementPlanTypekey =
- this.procurementPlanTypeList[i].constKey
- }
- }
- },
- handleChange(value) {
- this.selectedOptions = value
- this.dataList.receivePrivate = CodeToText[value[0]]
- this.dataList.receiveCity = CodeToText[value[1]]
- this.dataList.receiveArea = CodeToText[value[2]]
- },
- handleChange1(value) {
- this.selectedOptions1 = value
- this.dataList.outputPrivate = CodeToText[value[0]]
- this.dataList.outputCity = CodeToText[value[1]]
- },
- 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' })
- },
- loaddata() {
- procurementLook({ id: this.$route.query.id })
- .toPromise()
- .then((response) => {
- this.dataList = response
- var tmp = []
- tmp[0] = TextToCode[this.dataList.receivePrivate].code
- tmp[1] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity].code
- tmp[2] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity][this.dataList.receiveArea].code
- this.selectedOptions = tmp
- var tmp1 = []
- tmp1[0] = TextToCode[this.dataList.outputPrivate].code
- tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
- this.selectedOptions1 = tmp1
- })
- // 货名
- packList({ constId: 'CON2' })
- .toPromise()
- .then((response) => {
- this.goodnameList = response
- })
- // 品级
- packList({ constId: 'CON3' })
- .toPromise()
- .then((response) => {
- this.gradeList = response
- })
- //粒形
- packList({ constId: 'PRO4' })
- .toPromise()
- .then((response) => {
- this.grainList = response
- })
- //类型
- packList({ constId: 'PRO1' })
- .toPromise()
- .then((response) => {
- this.procurementPlanTypeList = response
- })
- //包装方式
- packList({ constId: 'PRO2' })
- .toPromise()
- .then((response) => {
- this.packingTypeList = response
- })
- //运费承担方
- packList({ constId: 'PRO3' })
- .toPromise()
- .then((response) => {
- this.freightPayerList = response
- })
- },
- submit() {
- if (!this.dataList.title) {
- this.$message({
- message: '标题不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.title.length>16) {
- this.$message({
- message: '标题输入错误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.plannedPurchaseVolume) {
- this.$message({
- message: '计划采购量不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.plannedPurchaseVolume>10000000||this.dataList.plannedPurchaseVolume<1) {
- this.$message({
- message: '计划采购量输入错误!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.plannedPurchaseVolume.toString().indexOf('.')!=-1) {
- if(this.dataList.plannedPurchaseVolume.toString().split('.')[1].length>2){
- this.$message({
- message: '计划采购量输入错误!',
- type: 'warning'
- })
- return
- }
- }
- if (!this.dataList.minimumVolume) {
- this.$message({
- message: '最小成交量不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
- this.$message({
- message: '最小成交量输入错误!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.minimumVolume.toString().indexOf('.') != -1 &&this.dataList.minimumVolume.toString().split('.')[1].length >2) {
- 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.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<-10000){
- this.$message({
- message: '基差输入错误',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.buyer) {
- this.$message({
- message: '买方不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.buyer.length>25||this.dataList.buyer.length<1) {
- this.$message({
- message: '买方输入错误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.buyerPhone) {
- this.$message({
- message: '请输入买方电话!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.buyerPhone.length!=11) {
- this.$message({
- message: '买方电话输入错误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.waterContent) {
- this.$message({
- message: '水分不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.waterContent>40||this.dataList.waterContent<1) {
- this.$message({
- message: '水分输入错误!',
- type: 'warning'
- })
- return
- }
- if (String(this.dataList.waterContent).indexOf('.') != -1 &&
- String(this.dataList.waterContent).length -
- (String(this.dataList.waterContent).indexOf('.') + 1) >
- 2) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- 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 -
- (String(this.dataList.bulkDensity).indexOf('.') + 1) >
- 2||this.dataList.bulkDensity>1000||this.dataList.bulkDensity<500){
- this.$message({
- message: '容重输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
- String(this.dataList.protein).length -
- (String(this.dataList.protein).indexOf('.') + 1) >
- 2||this.dataList.protein&&this.dataList.protein>80||this.dataList.protein&&this.dataList.protein<1){
- this.$message({
- message: '蛋白占比输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.impurity!=''&&this.dataList.impurity!=undefined&&String(this.dataList.impurity).indexOf('.') != -1 &&
- String(this.dataList.impurity).length -
- (String(this.dataList.impurity).indexOf('.') + 1) >2
- ||this.dataList.impurity>40||this.dataList.impurity<1) {
- this.$message({
- message: '杂质输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.mildewGrain!=''&&this.dataList.mildewGrain!=undefined&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
- String(this.dataList.mildewGrain).length -
- (String(this.dataList.mildewGrain).indexOf('.') + 1) >
- 2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1) {
- this.$message({
- message: '霉变粒输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.jiaorenli!=''&&this.dataList.jiaorenli!=undefined&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
- String(this.dataList.jiaorenli).length -
- (String(this.dataList.jiaorenli).indexOf('.') + 1) >
- 2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1) {
- this.$message({
- message: '热损伤输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.imperfectGrain!=''&&this.dataList.imperfectGrain!=undefined&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
- String(this.dataList.imperfectGrain).length -
- (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
- 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: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- this.$refs.dataList.validate((valid) => {
- if (valid) {
- this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
- this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
- this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
- this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
- this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
- if(this.dataList.procurementPlanType=='期货'){
- this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
- }
- this.dataList.compId = this.compId
- // this.dataList.pcFlag = 1
- this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
- this.dataList.unitPrice=this.dataList.procurementPrice
- procurementEdit(this.dataList)
- .toPromise()
- .then((response) => {
- this.$message.success('编辑成功')
- this.$router.push({ path: 'procurementPlanList' })
- })
- } else {
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- })
- .catch(() => {
- console.log(3523543534)
- 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) {
- this.dataList.goodsNameKey = this.goodnameList[i].constKey
- }
- }
- },
- selectpackingMethod(e) {
- for (var i = 0; i < this.packtypeList.length; i++) {
- if (this.packtypeList[i].constValue == e) {
- this.dataList.packingMethodKey = this.packtypeList[i].constKey
- }
- }
- },
- selectpackingMethod1(e) {
- for (var i = 0; i < this.packtypeList.length; i++) {
- if (this.packtypeList[i].constValue == e) {
- this.dataList1.packingMethodKey = this.packtypeList[i].constKey
- }
- }
- },
- selectstorageType(e) {
- for (var i = 0; i < this.storageType.length; i++) {
- if (this.storageType[i].constValue == e) {
- this.dataList.inOutTypeKey = this.storageType[i].constKey
- }
- }
- },
- selectstorageType1(e) {
- for (var i = 0; i < this.storageType1.length; i++) {
- if (this.storageType1[i].constValue == e) {
- this.dataList1.inOutTypeKey = this.storageType[i].constKey
- }
- }
- },
- handleClose() {
- this.accessoryTFs = false
- },
- tasktypechange() {
- this.tasknumber()
- },
- GetRandomNum(Min, Max) {
- var Range = Max - Min
- var Rand = Math.random()
- return Min + Math.round(Rand * Range)
- },
- // deletecontract(){},
- //删除
- approve() {},
- listQuery() {},
- total() {},
- clearfiltQuery() {},
- selectCrtDuty() {},
- },
- }
- </script>
- <style lang="scss" scoped>
- /deep/.basicInformation {
- .el-info-table {
- border: none;
- position: relative;
- }
- .el-form-item {
- width: 33.3333%;
- border: none;
- margin: 0;
- .el-form-item__label {
- text-align: left;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- }
- .el-form-item__content {
- padding-left: 0px;
- padding-right: 10px;
- // background: #fff;
- white-space: nowrap;
- height: 40px;
- display: flex;
- -webkit-box-align: center;
- align-items: center;
- text-align: left;
- overflow: hidden;
- }
- }
- }
- /deep/.el-radio {
- color: #606266;
- font-weight: 500;
- line-height: 1;
- cursor: pointer;
- white-space: nowrap;
- outline: 0;
- margin-right: 30px;
- margin-top: 15px;
- }
- /deep/.el-radio__inner {
- border: 1px solid #dcdfe6;
- border-radius: 100%;
- width: 14px;
- height: 14px;
- background-color: #fff;
- cursor: pointer;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- margin-left: 100px;
- }
- /deep/.el-radio__input {
- white-space: nowrap;
- cursor: pointer;
- outline: 0;
- line-height: 1;
- vertical-align: middle;
- margin-top: -1px;
- }
- .title {
- position: relative;
- padding-left: 10px;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .el-form {
- padding: 0 15%;
- display: flex;
- flex-wrap: wrap;
- margin-left: -50px;
- margin-top: 15px;
- width: 110%;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- }
- .el-col {
- background: #f6f7fc;
- }
- .bg-right {
- text-align: right;
- padding: 16px 20px;
- }
- .center {
- position: relative;
- top: 50px;
- width: 40%;
- height: 2000px;
- margin: 0 auto;
- margin-right: 180px;
- }
- /deep/.el-form-item__label {
- width: 160px;
- }
- .inspector {
- width: 50%;
- }
- /deep/.el-form-item--small .el-form-item__label,
- .el-form-item--small .el-form-item__content {
- text-align: left;
- }
- /deep/.el-input--small {
- font-size: 13px;
- position: relative;
- display: inline-block;
- }
- .center1 .small-title {
- margin-left: 323px;
- }
- .center1 {
- width: 90%;
- margin: 0 auto;
- margin-left: 10px;
- margin-top: 25px;
- }
- /deep/.el-input--small .el-input__inner {
- height: 32px;
- line-height: 32px;
- }
- /deep/.el-select {
- display: inline-block;
- position: relative;
- width: 100%;
- }
- .annu {
- height: 81px;
- background: #ffffff;
- border-radius: 4px;
- }
- .basicInformation .el-form-item {
- width: 50.3333%;
- border: none;
- margin: 0;
- }
- .el-form {
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- margin-left: 130px;
- }
- .a {
- margin-left: -32px;
- }
- .el-radio-group {
- margin-left: 80px;
- }
- .ding {
- height: 23px;
- background: #e8ecf6;
- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
- }
- .nav2 {
- height: 25px;
- background: #e8ecf6;
- margin-top: 15px;
- }
- .ziti {
- width: 72px;
- height: 20px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 20px;
- margin-left: 314px;
- /* margin-top: 112px; */
- }
- /deep/.ziti1 {
- height: 40px;
- font-size: 16px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #262626;
- line-height: 20px;
- margin-left: 381px;
- margin-top: -21px;
- width: 100px;
- }
- .winseaview-view {
- padding: 0 0 20px;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- /deep/.basicInformation .el-form-item .el-form-item__content {
- padding-left: 0px;
- padding-right: 10px;
- white-space: nowrap;
- height: 40px;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: left;
- overflow: hidden;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #232323;
- line-height: 14px;
- }
- .nav {
- 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;
- }
- </style>
|