|
@@ -20,7 +20,34 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="订单号" prop="id">
|
|
|
- <el-input v-model="mainForm.id" placeholder="订单号"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="mainForm.id"
|
|
|
+ placeholder="订单号"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :xs="24"
|
|
|
+ :sm="12"
|
|
|
+ :lg="8"
|
|
|
+ v-if="!listItem"
|
|
|
+ @click.native="handleShow"
|
|
|
+ >
|
|
|
+ <el-form-item label="销售政策编号" prop="policyCode">
|
|
|
+ <el-input
|
|
|
+ v-model="mainForm.policyCode"
|
|
|
+ placeholder="销售政策编号"
|
|
|
+ readonly
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8" v-else>
|
|
|
+ <el-form-item label="销售政策编号" prop="policyCode">
|
|
|
+ <el-input
|
|
|
+ v-model="mainForm.policyCode"
|
|
|
+ placeholder="销售政策编号"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
|
|
@@ -51,33 +78,17 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col
|
|
|
- :xs="24"
|
|
|
- :sm="12"
|
|
|
- :lg="8"
|
|
|
- v-if="!listItem"
|
|
|
- @click.native="handleShow"
|
|
|
- >
|
|
|
- <el-form-item label="销售政策编号" prop="policyCode" >
|
|
|
- <el-input
|
|
|
-
|
|
|
- v-model="mainForm.policyCode"
|
|
|
- placeholder="销售政策编号"
|
|
|
- readonly
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="8" v-else>
|
|
|
- <el-form-item label="销售政策编号" prop="policyCode">
|
|
|
+ <el-col :xs="24" :sm="16" :lg="16">
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
<el-input
|
|
|
- v-model="mainForm.policyCode"
|
|
|
- placeholder="销售政策编号"
|
|
|
+ v-model="mainForm.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <!--
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="销售政策" prop="id">
|
|
|
<el-select
|
|
@@ -101,9 +112,9 @@
|
|
|
placeholder="销售政策说明"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
</el-row>
|
|
|
-
|
|
|
+ <!--
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="业务员" prop="serviceName">
|
|
@@ -121,7 +132,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
</el-form>
|
|
|
|
|
|
<div class="main-title">
|
|
@@ -413,100 +424,267 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog title="添加产品" :visible.sync="isShowDialog" width="80%">
|
|
|
- <el-form
|
|
|
- ref="screenForm"
|
|
|
- :model="screenForm"
|
|
|
- size="small"
|
|
|
- label-position="left"
|
|
|
- >
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="type">
|
|
|
- <el-select
|
|
|
- v-model="screenForm.type"
|
|
|
- placeholder="选择品类"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in typeList"
|
|
|
- :key="item.dictCode"
|
|
|
- :label="item.dictValue"
|
|
|
- :value="item.dictCode"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="salesType">
|
|
|
- <el-select
|
|
|
- v-model="screenForm.salesType"
|
|
|
- placeholder="选择销售类型"
|
|
|
- style="width: 100%"
|
|
|
+ <el-dialog :visible.sync="isShowDialog" width="80%">
|
|
|
+ <template v-if="!cusIndex">
|
|
|
+ <el-form
|
|
|
+ :model="screenForm"
|
|
|
+ ref="screenForm"
|
|
|
+ label-width="120px"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item label="销售政策">
|
|
|
+ <el-select
|
|
|
+ v-model="screenForm.policyId"
|
|
|
+ placeholder="选择销售政策"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in policyList"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
+ </el-select> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item label="销售类型">
|
|
|
+ <el-select
|
|
|
+ v-model="screenForm.saleTypeCode"
|
|
|
+ placeholder="选择销售类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in ztypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.saleName"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8" class="tr">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="handlePolicyTypeList"
|
|
|
+ >查询</el-button
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in salesTypeList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.saleName"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="proNum">
|
|
|
- <el-input
|
|
|
- v-model="screenForm.proNum"
|
|
|
- placeholder="请输入产品编码"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="proName">
|
|
|
- <el-input
|
|
|
- v-model="screenForm.proName"
|
|
|
- placeholder="请输入产品名称"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="proModel">
|
|
|
- <el-input
|
|
|
- v-model="screenForm.proModel"
|
|
|
- placeholder="请输入产品型号"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="6" :lg="6">
|
|
|
- <el-form-item prop="price1" style="display: flex">
|
|
|
- <el-input
|
|
|
- v-model="screenForm.price1"
|
|
|
- placeholder="请输入价格"
|
|
|
- style="width: 46%"
|
|
|
- ></el-input>
|
|
|
- <span> - </span>
|
|
|
- <el-input
|
|
|
- v-model="screenForm.price2"
|
|
|
- placeholder="请输入价格"
|
|
|
- style="width: 46%"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="12" :sm="12" :lg="12" class="tr">
|
|
|
- <el-form-item label="">
|
|
|
- <el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
|
- <el-button size="small" type="primary" @click="submitScreenForm"
|
|
|
- >搜索</el-button
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-row :gutter="20" style="margin: 10px 0"> 选择限定机型 </el-row>
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="dataList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column align="center" width="55"
|
|
|
+ ><template slot-scope="scope">
|
|
|
+ <el-radio
|
|
|
+ v-model="radio"
|
|
|
+ :label="
|
|
|
+ scope.row.id +
|
|
|
+ '&' +
|
|
|
+ scope.row.policyId +
|
|
|
+ '&' +
|
|
|
+ scope.row.materialId +
|
|
|
+ '&' +
|
|
|
+ scope.row.policyConditionId
|
|
|
+ "
|
|
|
+ >{{ "" }}</el-radio
|
|
|
>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <template v-for="col in columns">
|
|
|
+ <el-table-column
|
|
|
+ v-if="col.num"
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.qty" size="small"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-else-if="col.jie"
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.qty * scope.row.price || 0 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-else
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitAddGoods">下一步</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-form
|
|
|
+ :model="screenForm"
|
|
|
+ ref="screenForm"
|
|
|
+ label-width="120px"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item label="销售政策">
|
|
|
+ <el-select
|
|
|
+ v-model="screenForm.policyId"
|
|
|
+ placeholder="选择销售政策"
|
|
|
+ disabled
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in policyList"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model="screenForm.type"
|
|
|
+ placeholder="产品编码"
|
|
|
+ size="small"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model="screenForm.type"
|
|
|
+ placeholder="产品名称"
|
|
|
+ size="small"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8">
|
|
|
+ <el-form-item label="销售类型">
|
|
|
+ <el-select
|
|
|
+ v-model="screenForm.type"
|
|
|
+ placeholder="选择销售类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in ztypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.saleName"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="8" :lg="8" class="tr">
|
|
|
+ <el-button type="primary" size="small">查询</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-row type="flex" :gutter="20">
|
|
|
+ <el-col>已选择限定机型</el-col>
|
|
|
+ <el-col></el-col>
|
|
|
+ <el-col></el-col>
|
|
|
+ <el-col></el-col>
|
|
|
+ <el-col></el-col>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="closeDialog">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitAddGoods">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <template v-for="(item, index) in popArr">
|
|
|
+ <el-table
|
|
|
+ v-if="index + 1 == cusIndex"
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="popDataArr[cusIndex - 1]"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column align="center" width="55"
|
|
|
+ ><template slot-scope="scope">
|
|
|
+ <el-radio
|
|
|
+ v-model="radioObj['radio' + cusIndex]"
|
|
|
+ :label="scope.row.id"
|
|
|
+ >{{ "" }}</el-radio
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <template v-for="col in columns">
|
|
|
+ <el-table-column
|
|
|
+ v-if="col.num"
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.qty" size="small"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-else-if="col.jie"
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.qty * scope.row.price || 0 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-else
|
|
|
+ align="center"
|
|
|
+ :label="col.lable"
|
|
|
+ :prop="col.prop"
|
|
|
+ :min-width="col.widht"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="cusIndex -= 1">上一步</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleCondition()"
|
|
|
+ v-if="popArr.length != cusIndex"
|
|
|
+ >下一步</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="hanlePopData"
|
|
|
+ v-if="popArr.length == cusIndex"
|
|
|
+ >完成</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -520,8 +698,13 @@ import {
|
|
|
getGoodsList,
|
|
|
getWalletList,
|
|
|
getWarehouseList,
|
|
|
+ policyList,
|
|
|
checkStock,
|
|
|
typeList,
|
|
|
+ getpolicyList,
|
|
|
+ getConditionList,
|
|
|
+ getConditionDetail,
|
|
|
+ getpolicyTypeList,
|
|
|
} from "@/api/supply/retail";
|
|
|
import { getDictList } from "@/api/common";
|
|
|
import { findElem } from "@/utils/util";
|
|
@@ -550,6 +733,17 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ date: "2016-05-03",
|
|
|
+ name: "王小虎",
|
|
|
+ address: "上海市普陀区金沙江路 1518 弄",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ cusIndex: 0,
|
|
|
+ radio: "",
|
|
|
+ pop: "",
|
|
|
+ popArr: [],
|
|
|
mainForm: {
|
|
|
id: "",
|
|
|
date: "",
|
|
@@ -558,6 +752,7 @@ export default {
|
|
|
remark: "",
|
|
|
policyCode: "",
|
|
|
policyRemark: "",
|
|
|
+ policyId: "",
|
|
|
},
|
|
|
mainFormRules: {
|
|
|
date: [
|
|
@@ -566,18 +761,12 @@ export default {
|
|
|
type: [{ required: true, message: "请选择品类", trigger: "change" }],
|
|
|
},
|
|
|
goodsList: [],
|
|
|
-
|
|
|
warehouseList: [],
|
|
|
warehouseValue: "",
|
|
|
isShowDialog: false,
|
|
|
screenForm: {
|
|
|
- type: "",
|
|
|
- salesType: "",
|
|
|
- proNum: "",
|
|
|
- proName: "",
|
|
|
- proModel: "",
|
|
|
- price1: "",
|
|
|
- price2: "",
|
|
|
+ policyId: "",
|
|
|
+ saleTypeCode: "",
|
|
|
},
|
|
|
currentPage: 1,
|
|
|
listTotal: 0,
|
|
@@ -586,12 +775,49 @@ export default {
|
|
|
ztypeList: [],
|
|
|
leftGoodsList: [],
|
|
|
rightGoodsList: [],
|
|
|
-
|
|
|
leftSelection: [],
|
|
|
rightSelection: [],
|
|
|
-
|
|
|
+ policyList: [],
|
|
|
xjWalletList: [],
|
|
|
flWalletList: [],
|
|
|
+ dataList: [],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "saleTypeName",
|
|
|
+ lable: "销售类型",
|
|
|
+ widht: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "materialName",
|
|
|
+ lable: "货品名称",
|
|
|
+ widht: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "specification",
|
|
|
+ lable: "规格型号",
|
|
|
+ widht: 160,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "qty",
|
|
|
+ lable: "数量",
|
|
|
+ widht: 160,
|
|
|
+ num: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "price",
|
|
|
+ lable: "单价",
|
|
|
+ widht: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "zong",
|
|
|
+ lable: "金额",
|
|
|
+ jie: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ listLoading: false,
|
|
|
+ popDataArr: [],
|
|
|
+ radioObj: {},
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -611,6 +837,7 @@ export default {
|
|
|
this.getDictList();
|
|
|
this.getWalletList();
|
|
|
this.getWarehouseList();
|
|
|
+ this.getPolicyList();
|
|
|
this.getTypeList();
|
|
|
if (this.listItem) {
|
|
|
this.getDetail();
|
|
@@ -622,7 +849,6 @@ export default {
|
|
|
goBack() {
|
|
|
this.$emit("backListFormDetail");
|
|
|
},
|
|
|
-
|
|
|
// 获取详情
|
|
|
getDetail() {
|
|
|
getDetail({ id: this.listItem.id }).then((res) => {
|
|
@@ -637,6 +863,15 @@ export default {
|
|
|
this.goodsList = data.retailOrderItemList;
|
|
|
});
|
|
|
},
|
|
|
+ getPolicyList() {
|
|
|
+ policyList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: -1,
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res, "tyep");
|
|
|
+ this.policyList = res.data.records;
|
|
|
+ });
|
|
|
+ },
|
|
|
getTypeList() {
|
|
|
const params = {
|
|
|
pageNum: 1,
|
|
@@ -649,6 +884,12 @@ export default {
|
|
|
this.ztypeList = res.data.records;
|
|
|
});
|
|
|
},
|
|
|
+ handleSelectiontAllChange(e) {
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
+ handleSelectionChange(e) {
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
// 获取仓库列表
|
|
|
getWarehouseList() {
|
|
|
getWarehouseList({
|
|
@@ -658,9 +899,35 @@ export default {
|
|
|
this.warehouseList = res.data.records;
|
|
|
});
|
|
|
},
|
|
|
- handleShow(){
|
|
|
- this.isShowDialog = true
|
|
|
- console.log(11111);
|
|
|
+ // 获取限定机型
|
|
|
+ getpolicyTypeList() {
|
|
|
+ getpolicyTypeList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ policyId: this.screenForm.policyId,
|
|
|
+ saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
+ }).then((res) => {
|
|
|
+ for (let i = 0; i < res.data.records.length; i++) {
|
|
|
+ res.data.records[i].qty = 1;
|
|
|
+ }
|
|
|
+ this.dataList = res.data.records;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getMaterialTypeList() {
|
|
|
+ getMaterialTypeList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ policyId: this.screenForm.policyId,
|
|
|
+ saleTypeCode: this.screenForm.saleTypeCode,
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res, 1111);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handlePolicyTypeList() {
|
|
|
+ this.getpolicyTypeList();
|
|
|
+ },
|
|
|
+ handleShow() {
|
|
|
+ this.isShowDialog = true;
|
|
|
},
|
|
|
// 获取钱包列表
|
|
|
getWalletList() {
|
|
@@ -779,54 +1046,6 @@ export default {
|
|
|
this.isShowDialog = false;
|
|
|
},
|
|
|
|
|
|
- // 左侧列表选择
|
|
|
- leftSelectionChange(val) {
|
|
|
- this.leftSelection = val;
|
|
|
- },
|
|
|
-
|
|
|
- // 右侧列表选择
|
|
|
- rightSelectionChange(val) {
|
|
|
- this.rightSelection = val;
|
|
|
- },
|
|
|
-
|
|
|
- // 数组去重
|
|
|
- delRepeat(arr1, arr2) {
|
|
|
- let allArr = arr1.concat(arr2); // 两个数组对象合并
|
|
|
- let newArr = []; // 存放去重后数据的新数组
|
|
|
- for (let i = 0; i < allArr.length; i++) {
|
|
|
- // 循环allArr数组对象的内容
|
|
|
- let flag = true; // 建立标记,判断数据是否重复,true为不重复
|
|
|
- for (let j = 0; j < newArr.length; j++) {
|
|
|
- // 循环新数组的内容
|
|
|
- if (allArr[i].materialId == newArr[j].materialId) {
|
|
|
- // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
|
|
|
- flag = false;
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- // 判断是否重复
|
|
|
- newArr.push(allArr[i]); // 不重复的放入新数组。 新数组的内容会继续进行上边的循环。
|
|
|
- }
|
|
|
- }
|
|
|
- return newArr;
|
|
|
- },
|
|
|
-
|
|
|
- // 全部添加
|
|
|
- addAllGoods() {
|
|
|
- this.rightGoodsList = this.delRepeat(
|
|
|
- this.leftGoodsList,
|
|
|
- this.rightGoodsList
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
- // 添加
|
|
|
- addGoods() {
|
|
|
- this.rightGoodsList = this.delRepeat(
|
|
|
- this.leftSelection,
|
|
|
- this.rightGoodsList
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
// 删除
|
|
|
deleteGoods() {
|
|
|
let rightGoodsList = this.rightGoodsList;
|
|
@@ -839,20 +1058,78 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- // 全部删除
|
|
|
- deleteAllGoods() {
|
|
|
- this.rightGoodsList = [];
|
|
|
+ handleCondition() {
|
|
|
+ if (Object.values(this.radioObj)[this.cusIndex - 1] !== "") {
|
|
|
+ this.popArr.length >= this.cusIndex ? (this.cusIndex += 1) : "";
|
|
|
+ const params = this.radio.split("&");
|
|
|
+ this.getConditionList(params[3], this.cusIndex);
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.$errorMsg("请选择");
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
// 确定 添加产品
|
|
|
submitAddGoods() {
|
|
|
- this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
|
|
|
- this.isShowDialog = false;
|
|
|
- this.leftGoodsList = [];
|
|
|
- this.rightGoodsList = [];
|
|
|
+ if (this.radio) {
|
|
|
+ const params = this.radio.split("&");
|
|
|
+ this.screenForm.policyId = params[1];
|
|
|
+ this.mainForm.policyId = params[1];
|
|
|
+ this.cusIndex += 1;
|
|
|
+ getpolicyList({
|
|
|
+ materialId: params[2],
|
|
|
+ policyId: params[1],
|
|
|
+ }).then((res) => {
|
|
|
+ this.pop = res.data.pop;
|
|
|
+ this.popArr = res.data.pop.split(":");
|
|
|
+ for (let i = 0; i < this.popArr.length; i++) {
|
|
|
+ this.$set(this.radioObj, "radio" + (i + 1), "");
|
|
|
+ }
|
|
|
+ console.log(this.radioObj);
|
|
|
+ this.getConditionList(params[3], this.cusIndex);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$errorMsg("请选择");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getConditionList(policyConditionId, popType) {
|
|
|
+ getConditionList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ policyConditionId,
|
|
|
+ popType,
|
|
|
+ }).then((res) => {
|
|
|
+ for (let i = 0; i < res.data.records.length; i++) {
|
|
|
+ res.data.records[i].qty = 1;
|
|
|
+ }
|
|
|
+ if (this.popDataArr.length) {
|
|
|
+ this.popDataArr.splice(this.cusIndex - 1, 1);
|
|
|
+ }
|
|
|
+ if (this.cusIndex == 0) {
|
|
|
+ this.popDataArr = [];
|
|
|
+ }
|
|
|
+ this.popDataArr.push(res.data.records);
|
|
|
+ console.log(this.popDataArr, "[]", this.radioObj);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ hanlePopData() {
|
|
|
+ if (!Object.values(this.radioObj).includes("")) {
|
|
|
+ let arrData = [];
|
|
|
+ for (let i = 0; i < this.popDataArr.length; i++) {
|
|
|
+ arrData = [...arrData, ...this.popDataArr[i]];
|
|
|
+ }
|
|
|
+ for (let j = 0; j < arrData.length; j++) {
|
|
|
+ for (const key in this.radioObj) {
|
|
|
+ if (arrData[j].id == this.radioObj[key]) {
|
|
|
+ this.goodsList = [...this.goodsList, arrData[j]];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.cusIndex = 0
|
|
|
+ this.isShowDialog = false;
|
|
|
+ } else {
|
|
|
+ this.$errorMsg("请选择");
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
// 删除产品
|
|
|
deleteItem(index) {
|
|
|
this.goodsList.splice(index, 1);
|
|
@@ -915,8 +1192,9 @@ export default {
|
|
|
mainId: this.mainForm.type,
|
|
|
mainName,
|
|
|
remark: this.mainForm.remark,
|
|
|
- type: 1, // 1:普通零售单,2:政策零售单
|
|
|
+ type: 2, // 1:普通零售单,2:政策零售单
|
|
|
retailOrderItemList: this.goodsList,
|
|
|
+ policyId: this.screenForm.policyId,
|
|
|
};
|
|
|
if (this.listItem) {
|
|
|
params.id = this.listItem.id;
|