|
@@ -25,104 +25,158 @@
|
|
</div>
|
|
</div>
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
<!-- 标题 -->
|
|
<!-- 标题 -->
|
|
- <el-form-item label="标题" span="1">
|
|
|
|
- <el-input v-model="dataList.warehouseName" maxlength="16" placeholder="请输入标题,不超过16个字" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="标题" span="1" prop="title">
|
|
|
|
+ <el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
|
|
|
|
+ </ws-form-item>
|
|
<!-- 货名 -->
|
|
<!-- 货名 -->
|
|
- <el-form-item label="货名" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.inOutType"
|
|
|
|
- class="typeselect"
|
|
|
|
- placeholder="请选择货名"
|
|
|
|
|
|
+ <ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
|
+ <ws-select
|
|
disabled
|
|
disabled
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ 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>
|
|
<!-- 计划销售量(吨) -->
|
|
<!-- 计划销售量(吨) -->
|
|
- <el-form-item label="计划销售量(吨)" span="1">
|
|
|
|
- <el-input v-model="dataList.contractNo" class="typeselect" placeholder="请输入销售量" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="计划销售量(吨)" span="1" prop="plannedSaleVolume">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="dataList.plannedSaleVolume"
|
|
|
|
+ class="typeselect"
|
|
|
|
+ placeholder="请输入计划采购量"
|
|
|
|
+ />
|
|
|
|
+ </ws-form-item>
|
|
<!-- 最小成交量 -->
|
|
<!-- 最小成交量 -->
|
|
- <el-form-item label="最小成交量(吨)" span="1">
|
|
|
|
- <el-input v-model="dataList.goodsName" placeholder="请输入最小成交量" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
|
|
|
|
+ <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
|
|
|
|
+ </ws-form-item>
|
|
<!--类型-->
|
|
<!--类型-->
|
|
- <el-form-item label="类型" span="1">
|
|
|
|
- <el-select v-model="dataList.weight" maxlength="120" placeholder="请选择类型" disabled />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="类型" span="1" prop="salePlanType">
|
|
|
|
+ <ws-select
|
|
|
|
+ disabled
|
|
|
|
+ v-model="dataList.salePlanType"
|
|
|
|
+ placeholder
|
|
|
|
+ class="typeselect"
|
|
|
|
+ @change="selectsalePlanType"
|
|
|
|
+ >
|
|
|
|
+ <ws-option
|
|
|
|
+ v-for="item in salePlanTypeList"
|
|
|
|
+ :key="item.constKey"
|
|
|
|
+ :label="item.constValue"
|
|
|
|
+ :value="item.constValue"
|
|
|
|
+ />
|
|
|
|
+ </ws-select>
|
|
|
|
+ </ws-form-item>
|
|
<!-- 价格类型 -->
|
|
<!-- 价格类型 -->
|
|
- <el-form-item label="价格类型" span="1">
|
|
|
|
- <el-input v-model="dataList.grade" placeholder="请输入价格类型" disabled />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="价格类型" span="1" prop="priceType">
|
|
|
|
+ <el-input v-model="dataList.priceType" disabled />
|
|
|
|
+ </ws-form-item>
|
|
<!-- 基差 -->
|
|
<!-- 基差 -->
|
|
- <el-form-item label="基差(元/吨)" span="1">
|
|
|
|
- <el-input v-model="dataList.grade" placeholder="请输入基差" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item
|
|
|
|
+ v-show="dataList.salePlanType=='期货'"
|
|
|
|
+ label="基差(元/吨)"
|
|
|
|
+ span="1"
|
|
|
|
+ prop="basisPrice"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
|
|
|
|
+ </ws-form-item>
|
|
<!--销售价格(元)-->
|
|
<!--销售价格(元)-->
|
|
- <el-form-item label="销售价格(元)" span="1">
|
|
|
|
|
|
+ <ws-form-item
|
|
|
|
+ v-show="dataList.salePlanType=='现货'"
|
|
|
|
+ label="销售价格(元)"
|
|
|
|
+ span="1"
|
|
|
|
+ prop="salePrice"
|
|
|
|
+ >
|
|
<el-input
|
|
<el-input
|
|
- v-model="dataList.bulkDensity"
|
|
|
|
|
|
+ v-model="dataList.salePrice"
|
|
maxlength="120"
|
|
maxlength="120"
|
|
size="small"
|
|
size="small"
|
|
placeholder="请输入销售价格"
|
|
placeholder="请输入销售价格"
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </ws-form-item>
|
|
<!--出货库-->
|
|
<!--出货库-->
|
|
- <el-form-item label="出货库" span="1">
|
|
|
|
|
|
+ <ws-form-item label="出货库" span="1" prop="sendWarehouse">
|
|
<el-select
|
|
<el-select
|
|
- v-model="dataList.waterContent"
|
|
|
|
|
|
+ disabled
|
|
|
|
+ v-model="dataList.sendWarehouse"
|
|
maxlength="120"
|
|
maxlength="120"
|
|
size="small"
|
|
size="small"
|
|
- placeholder="请选择出货库"
|
|
|
|
|
|
+
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in warehouseList1"
|
|
|
|
+ :key="item.constKey"
|
|
|
|
+ :label="item.warehouseName"
|
|
|
|
+ :value="item.warehouseName"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </ws-form-item>
|
|
<!--出货库所在地区-->
|
|
<!--出货库所在地区-->
|
|
- <el-form-item label="出货库所在地区" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.unitPrice"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
|
|
+ <ws-form-item label="出货库所在地区" span="1" >
|
|
|
|
+ <el-cascader
|
|
|
|
+ :options="options_"
|
|
|
|
+ v-model="selectedOptions"
|
|
|
|
+ clearable
|
|
|
|
+ size="large"
|
|
placeholder="请选择出货库所在地区"
|
|
placeholder="请选择出货库所在地区"
|
|
|
|
+ @change="handleChange"
|
|
|
|
+ style="width:200%"
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </ws-form-item>
|
|
<!--运费承担方-->
|
|
<!--运费承担方-->
|
|
- <el-form-item label="运费承担方" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.unitPrice"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请选择运费承担方"
|
|
|
|
- />
|
|
|
|
- </el-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>
|
|
<!--包装方式-->
|
|
<!--包装方式-->
|
|
- <el-form-item label="包装方式" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.agent"
|
|
|
|
- filterable
|
|
|
|
- :filter-method="dataFilter"
|
|
|
|
- placeholder="请选择包装方式"
|
|
|
|
- ></el-select>
|
|
|
|
- </el-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 label="装袋备注" span="1">
|
|
|
|
|
|
+ <el-form-item v-if="dataList.packingType != '散装'" label="装袋备注" span="1" prop="baggingNotes">
|
|
<el-input
|
|
<el-input
|
|
- v-model="dataList.businessDescribe"
|
|
|
|
|
|
+ v-model="dataList.baggingNotes"
|
|
size="small"
|
|
size="small"
|
|
placeholder="请输入装袋要求如:98斤,王中王彩袋"
|
|
placeholder="请输入装袋要求如:98斤,王中王彩袋"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 卖方 -->
|
|
<!-- 卖方 -->
|
|
- <el-form-item label="卖方" span="1">
|
|
|
|
- <el-input
|
|
|
|
- v-model="dataList.unitPrice"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请输入卖方名称"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <ws-form-item label="买方" span="1" prop="seller">
|
|
|
|
+ <el-input v-model="dataList.seller" maxlength="120" size="small" placeholder="请输入卖方名称" />
|
|
|
|
+ </ws-form-item>
|
|
<!-- 卖方电话 -->
|
|
<!-- 卖方电话 -->
|
|
- <el-form-item label="卖方电话" span="1">
|
|
|
|
|
|
+ <el-form-item label="买方电话" span="1" prop="sellerPhone">
|
|
<el-input
|
|
<el-input
|
|
- v-model="dataList.agent"
|
|
|
|
|
|
+ v-model="dataList.sellerPhone"
|
|
filterable
|
|
filterable
|
|
:filter-method="dataFilter"
|
|
:filter-method="dataFilter"
|
|
placeholder="请输入卖方电话"
|
|
placeholder="请输入卖方电话"
|
|
@@ -136,64 +190,89 @@
|
|
<h3>货物要求</h3>
|
|
<h3>货物要求</h3>
|
|
</div>
|
|
</div>
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
<el-form ref="dataList" :model="dataList" label-width="140px">
|
|
- <el-form-item label="水分(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.warehouseName" class="typeselect" placeholder="请输入水分占比" />
|
|
|
|
|
|
+ <!-- 水分 -->
|
|
|
|
+ <el-form-item label="水分(%)<=" span="1" prop="waterContent">
|
|
|
|
+ <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
<!-- 容重 -->
|
|
<!-- 容重 -->
|
|
- <el-form-item label="容重(g/l)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.warehouseName" class="typeselect" placeholder="请输入容重" />
|
|
|
|
|
|
+ <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>
|
|
<!-- 热损伤 -->
|
|
<!-- 热损伤 -->
|
|
- <el-form-item label="热损伤(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.inOutType" class="typeselect" placeholder="请输入热损伤占比" />
|
|
|
|
|
|
+ <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
|
|
|
|
+ <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 杂质 -->
|
|
<!-- 杂质 -->
|
|
- <el-form-item label="杂质(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.contractNo" class="typeselect" placeholder="请输入杂质占比" />
|
|
|
|
|
|
+ <el-form-item label="杂质(%)<=" span="1" prop="impurity">
|
|
|
|
+ <el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 霉变粒 -->
|
|
<!-- 霉变粒 -->
|
|
- <el-form-item label="霉变粒(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.goodsName" placeholder="请输入霉变粒占比" />
|
|
|
|
|
|
+ <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
|
|
|
|
+ <el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!--不完善粒(%)<=-->
|
|
<!--不完善粒(%)<=-->
|
|
- <el-form-item label="不完善粒(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.weight" maxlength="120" placeholder="请输入不完善粒占比" />
|
|
|
|
|
|
+ <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
|
|
|
|
+ <el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 蛋白(%)<= -->
|
|
<!-- 蛋白(%)<= -->
|
|
- <el-form-item label="蛋白(%)<=" span="1">
|
|
|
|
- <el-input v-model="dataList.grade" class="typeselect" placeholder="请输入蛋白占比" />
|
|
|
|
|
|
+ <el-form-item label="蛋白(%)<=" span="1" prop="protein">
|
|
|
|
+ <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!--粒型-->
|
|
<!--粒型-->
|
|
- <el-form-item label="粒型" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.bulkDensity"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
- 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>
|
|
<!--品级-->
|
|
<!--品级-->
|
|
- <el-form-item label="品级" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.waterContent"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请选择品级"
|
|
|
|
- />
|
|
|
|
- </el-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>
|
|
<!--产地-->
|
|
<!--产地-->
|
|
- <el-form-item label="产地" span="1">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataList.unitPrice"
|
|
|
|
- maxlength="120"
|
|
|
|
- size="small"
|
|
|
|
|
|
+ <ws-form-item label="产地" span="1" >
|
|
|
|
+ <el-cascader
|
|
|
|
+ :options="options1_"
|
|
|
|
+ v-model="selectedOptions1"
|
|
|
|
+ clearable
|
|
|
|
+ size="large"
|
|
placeholder="请选择产地"
|
|
placeholder="请选择产地"
|
|
|
|
+ @change="handleChange1"
|
|
|
|
+ style="width:200%"
|
|
/>
|
|
/>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </ws-form-item>
|
|
<!--产出年份-->
|
|
<!--产出年份-->
|
|
- <el-form-item label="产出年份" span="1">
|
|
|
|
- <el-select v-model="dataList.unitPrice" size="small" placeholder="请选择年份" />
|
|
|
|
|
|
+ <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-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -206,15 +285,12 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getwarehousename,
|
|
|
|
- xialaNo,
|
|
|
|
- addoreditoutput,
|
|
|
|
- outexamine
|
|
|
|
-} from '@/model/tasksport/index'
|
|
|
|
-import { packList } from '@/model/contarct/index'
|
|
|
|
-import { pullDown, getstaff } from '@/model/warehouse/index'
|
|
|
|
-import { downloadFile } from '@/utils/batchDown'
|
|
|
|
|
|
+ saleLook,
|
|
|
|
+ saleEdit,
|
|
|
|
+} from '@/model/salesManagement/index'
|
|
|
|
+import { regionData, CodeToText, TextToCode ,provinceAndCityDataPlus} from 'element-china-area-data'
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
+import { packList } from '@/model/contarct/index'
|
|
import { mapActions, mapGetters, mapState } from 'vuex'
|
|
import { mapActions, mapGetters, mapState } from 'vuex'
|
|
import WsUpload from '@/components/WsUpload'
|
|
import WsUpload from '@/components/WsUpload'
|
|
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
// import { dayjs, fmoney, EventBus } from 'base-core-lib'
|
|
@@ -249,6 +325,8 @@ export default {
|
|
showType: true,
|
|
showType: true,
|
|
// 年
|
|
// 年
|
|
year: '',
|
|
year: '',
|
|
|
|
+ options1_: provinceAndCityDataPlus,
|
|
|
|
+ options_: regionData,
|
|
contractNoList: [],
|
|
contractNoList: [],
|
|
deptBudgetTotal: 0,
|
|
deptBudgetTotal: 0,
|
|
readonly: true,
|
|
readonly: true,
|
|
@@ -303,9 +381,18 @@ export default {
|
|
contractList: [],
|
|
contractList: [],
|
|
inOutTaskNo: '',
|
|
inOutTaskNo: '',
|
|
inOutTaskNo1: '',
|
|
inOutTaskNo1: '',
|
|
|
|
+ freightPayerList: '',
|
|
|
|
+ packingTypeList: '',
|
|
dataList: { taskTypeKey: '1' },
|
|
dataList: { taskTypeKey: '1' },
|
|
dataList1: { taskTypeKey: '1' },
|
|
dataList1: { taskTypeKey: '1' },
|
|
historyList: [],
|
|
historyList: [],
|
|
|
|
+ salePlanTypeList:[],
|
|
|
|
+ selectedOptions:[],
|
|
|
|
+ selectedOptions1: [],
|
|
|
|
+ grainList: [],
|
|
|
|
+ warehouseNameList: [],
|
|
|
|
+ warehouseNameList1: [],
|
|
|
|
+ warehouseList1: [],
|
|
pickerBeginDateBefore: {
|
|
pickerBeginDateBefore: {
|
|
disabledDate: time => {
|
|
disabledDate: time => {
|
|
return time.getTime() > Date.now()
|
|
return time.getTime() > Date.now()
|
|
@@ -314,15 +401,19 @@ export default {
|
|
accessoryTFs: false
|
|
accessoryTFs: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ activated() {
|
|
|
|
+ this.loaddata()
|
|
|
|
+ this.showType = this.isShow
|
|
},
|
|
},
|
|
|
|
+ mounted() {},
|
|
methods: {
|
|
methods: {
|
|
//返回按钮
|
|
//返回按钮
|
|
revert() {
|
|
revert() {
|
|
this.$router.go(-1)
|
|
this.$router.go(-1)
|
|
},
|
|
},
|
|
returnsales() {
|
|
returnsales() {
|
|
|
|
+ this.dataList = {}
|
|
|
|
+ // this.selectedOptions = ''
|
|
this.$router.push({ path: 'salesPlanList' })
|
|
this.$router.push({ path: 'salesPlanList' })
|
|
},
|
|
},
|
|
// 获取当前年月日
|
|
// 获取当前年月日
|
|
@@ -372,6 +463,14 @@ export default {
|
|
this.options = this.staffList
|
|
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) {
|
|
selectstaff(e) {
|
|
for (var i = 0; i < this.staffList.length; i++) {
|
|
for (var i = 0; i < this.staffList.length; i++) {
|
|
if (this.staffList[i].staffName == e) {
|
|
if (this.staffList[i].staffName == e) {
|
|
@@ -386,49 +485,325 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- requestadd(list, status) {
|
|
|
|
- this.$refs.dataList.validate(valid => {
|
|
|
|
- if (valid) {
|
|
|
|
- list.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- list.publisher =
|
|
|
|
- sessionStorage.getItem('ws-pf_roleName') +
|
|
|
|
- sessionStorage.getItem('ws-pf_staffName')
|
|
|
|
- addoreditoutput(list)
|
|
|
|
- .toPromise()
|
|
|
|
- .then(response => {
|
|
|
|
- this.$message.success('添加成功')
|
|
|
|
- this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
- return false
|
|
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ selectsalePlanType(e) {
|
|
|
|
+ for (var i = 0; i < this.salePlanTypeList.length; i++) {
|
|
|
|
+ if (this.salePlanTypeList[i].constValue == e) {
|
|
|
|
+ this.dataList.salePlanTypeKey = this.salePlanTypeList[
|
|
|
|
+ i
|
|
|
|
+ ].constKey
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleChange(value) {
|
|
|
|
+ this.selectedOptions = value
|
|
|
|
+ this.dataList.sendPrivate = CodeToText[value[0]]
|
|
|
|
+ this.dataList.sendCity = CodeToText[value[1]]
|
|
|
|
+ this.dataList.sendArea = CodeToText[value[2]]
|
|
|
|
+ },
|
|
|
|
+ handleChange1(value) {
|
|
|
|
+ this.selectedOptions1 = value
|
|
|
|
+ this.dataList.sendPrivate = CodeToText[value[0]]
|
|
|
|
+ this.dataList.sendCity = CodeToText[value[1]]
|
|
|
|
+ this.dataList.sendArea = CodeToText[value[2]]
|
|
|
|
+ },
|
|
|
|
+ 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() {
|
|
close() {
|
|
this.$router.push({ path: 'procurementPlanList' })
|
|
this.$router.push({ path: 'procurementPlanList' })
|
|
},
|
|
},
|
|
- //提交按钮
|
|
|
|
- // submit() {
|
|
|
|
- // if (this.dataList.taskTypeKey == 1) {
|
|
|
|
- // this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
|
|
- // this.requestadd(this.dataList)
|
|
|
|
- // } else if (this.dataList.taskTypeKey == 2) {
|
|
|
|
- // this.dataList.inOutTaskNo = this.inOutTaskNo1
|
|
|
|
- // this.requestadd(this.dataList)
|
|
|
|
- // } else if (
|
|
|
|
- // this.dataList.taskTypeKey == 3 ||
|
|
|
|
- // this.dataList.taskTypeKey == 4
|
|
|
|
- // ) {
|
|
|
|
- // this.dataList.inOutTaskNo = this.inOutTaskNo
|
|
|
|
- // this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
|
|
|
|
- // this.requestadd(this.dataList, 'repetition')
|
|
|
|
- // this.dataList1.inOutTaskNo = this.inOutTaskNo1
|
|
|
|
- // this.dataList1.relevanceId = this.dataList.relevanceId
|
|
|
|
- // this.requestadd(this.dataList1, 'repetition')
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
+
|
|
|
|
+ loaddata() {
|
|
|
|
+ saleLook({ id: this.$route.query.id })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.dataList = response
|
|
|
|
+ var tmp = []
|
|
|
|
+ tmp[0] = TextToCode[this.dataList.sendPrivate].code
|
|
|
|
+ tmp[1] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity].code
|
|
|
|
+ tmp[2] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity][this.dataList.sendArea].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.salePlanTypeList = 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.plannedSaleVolume) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '计划销售量不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.dataList.minimumVolume) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '最小交易量不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.dataList.seller) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '卖方不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '卖方输入错误!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.dataList.sellerPhone) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请输入卖方电话!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.dataList.sellerPhone.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 &&
|
|
|
|
+ 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 > 40 ||
|
|
|
|
+ this.dataList.protein < 1
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '蛋白占比输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.dataList.impurity &&
|
|
|
|
+ String(this.dataList.impurity).indexOf('.') != -1 &&
|
|
|
|
+ String(this.dataList.impurity).length -
|
|
|
|
+ (String(this.dataList.impurity).indexOf('.') + 1) >
|
|
|
|
+ 2
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '杂质输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.dataList.mildewGrain &&
|
|
|
|
+ String(this.dataList.mildewGrain).indexOf('.') != -1 &&
|
|
|
|
+ String(this.dataList.mildewGrain).length -
|
|
|
|
+ (String(this.dataList.mildewGrain).indexOf('.') + 1) >
|
|
|
|
+ 2
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '霉变粒输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.dataList.jiaorenli &&
|
|
|
|
+ String(this.dataList.jiaorenli).indexOf('.') != -1 &&
|
|
|
|
+ String(this.dataList.jiaorenli).length -
|
|
|
|
+ (String(this.dataList.jiaorenli).indexOf('.') + 1) >
|
|
|
|
+ 2
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '热损伤输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.dataList.imperfectGrain &&
|
|
|
|
+ String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
|
|
|
|
+ String(this.dataList.imperfectGrain).length -
|
|
|
|
+ (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
|
|
|
|
+ 2
|
|
|
|
+ ) {
|
|
|
|
+ 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.sourceProvince = CodeToText[this.selectedOptions[0]]
|
|
|
|
+ // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
|
|
|
|
+ this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
|
|
|
|
+ this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
|
|
|
|
+ this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
|
|
|
|
+
|
|
|
|
+ this.dataList.compId = this.compId
|
|
|
|
+ this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
+ saleEdit(this.dataList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('编辑成功')
|
|
|
|
+ ;(this.outputYear = ''),
|
|
|
|
+ this.$router.push({ path: 'salesPlanList' })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ console.log(3523543534)
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
selectwarehouseName() {},
|
|
selectwarehouseName() {},
|
|
tarechange(e) {
|
|
tarechange(e) {
|
|
if (this.dataList.grossWeight && this.dataList.tare) {
|
|
if (this.dataList.grossWeight && this.dataList.tare) {
|
|
@@ -451,13 +826,6 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- selectgoodsName1(e) {
|
|
|
|
- for (var i = 0; i < this.goodnameList.length; i++) {
|
|
|
|
- if (this.goodnameList[i].constValue == e) {
|
|
|
|
- this.dataList1.goodsNameKey = this.goodnameList[i].constKey
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
selectpackingMethod(e) {
|
|
selectpackingMethod(e) {
|
|
for (var i = 0; i < this.packtypeList.length; i++) {
|
|
for (var i = 0; i < this.packtypeList.length; i++) {
|
|
if (this.packtypeList[i].constValue == e) {
|
|
if (this.packtypeList[i].constValue == e) {
|
|
@@ -497,24 +865,6 @@ export default {
|
|
var Rand = Math.random()
|
|
var Rand = Math.random()
|
|
return Min + Math.round(Rand * Range)
|
|
return Min + Math.round(Rand * Range)
|
|
},
|
|
},
|
|
- getList() {
|
|
|
|
- outexamine({ relevanceId: this.$route.query.relevanceId })
|
|
|
|
- .toPromise()
|
|
|
|
- .then(response => {
|
|
|
|
- if (response.length > 1) {
|
|
|
|
- this.dataList = response[0]
|
|
|
|
- this.dataList1 = response[1]
|
|
|
|
- } else {
|
|
|
|
- console.log(response[0].taskTypeKey)
|
|
|
|
- if (response[0].taskTypeKey == 2) {
|
|
|
|
- this.dataList1 = response[0]
|
|
|
|
- } else {
|
|
|
|
- this.dataList = response[0]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
// deletecontract(){},
|
|
// deletecontract(){},
|
|
//删除
|
|
//删除
|
|
approve() {},
|
|
approve() {},
|
|
@@ -553,6 +903,7 @@ export default {
|
|
align-items: center;
|
|
align-items: center;
|
|
text-align: left;
|
|
text-align: left;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -753,4 +1104,7 @@ export default {
|
|
top: 21%;
|
|
top: 21%;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
}
|
|
}
|
|
|
|
+/deep/.typeselect .el-input__inner {
|
|
|
|
+ color: #8890b1;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|