|
@@ -6,7 +6,7 @@
|
|
|
<div class="title">工程订单</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
|
|
|
+ <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="110px" size="small" label-position="right">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="工程订单" prop="orderNum">
|
|
@@ -33,27 +33,30 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="经销商编码" prop="jxsNum">
|
|
|
- <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码"></el-input>
|
|
|
+ <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="16">
|
|
|
<el-form-item label="经销商名称" prop="jxsName">
|
|
|
- <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称"></el-input>
|
|
|
+ <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
- <el-form-item label="工程登录单号" prop="loginNum">
|
|
|
- <el-input v-model="mainForm.loginNum" placeholder="请输入工程登录单号"></el-input>
|
|
|
+ <el-form-item label="工程登录编号" prop="loginNum">
|
|
|
+ <div style="display: flex;">
|
|
|
+ <el-input v-model="mainForm.loginNum" placeholder="请选择工程登录" readonly></el-input>
|
|
|
+ <el-button style="margin-left: 10px;" @click="openShareDetail" :disabled="mainForm.loginNum !== ''">选择</el-button>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="工程项目名称" prop="enginName">
|
|
|
- <el-input v-model="mainForm.enginName" placeholder="请输入工程项目名称"></el-input>
|
|
|
+ <el-input v-model="mainForm.enginName" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="工程登录类型" prop="loginType">
|
|
|
- <el-input v-model="mainForm.loginType" placeholder="请输入工程登录类型"></el-input>
|
|
|
+ <el-input v-model="mainForm.loginType" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
@@ -63,7 +66,7 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="使用单位" prop="company">
|
|
|
- <el-input v-model="mainForm.company" placeholder="请输入使用单位"></el-input>
|
|
|
+ <el-input v-model="mainForm.company" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
@@ -75,22 +78,22 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="联系人" prop="contactMan">
|
|
|
- <el-input v-model="mainForm.contactMan" placeholder="请输入联系人"></el-input>
|
|
|
+ <el-input v-model="mainForm.contactMan" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="固定电话" prop="tel">
|
|
|
- <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
|
|
|
+ <el-input v-model="mainForm.tel" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="移动电话" prop="phone">
|
|
|
- <el-input v-model="mainForm.phone" placeholder="请输入移动电话"></el-input>
|
|
|
+ <el-input v-model="mainForm.phone" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
|
<el-form-item label="安装地址" prop="address">
|
|
|
- <el-input v-model="mainForm.address" placeholder="请输入安装地址"></el-input>
|
|
|
+ <el-input v-model="mainForm.address" placeholder="请选择工程登录" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
@@ -110,13 +113,14 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="制单人" prop="createMan">
|
|
|
- <el-input v-model="mainForm.createMan" placeholder="请输入制单人"></el-input>
|
|
|
+ <el-input v-model="mainForm.createMan" placeholder="请输入制单人" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
|
|
|
<el-form-item label="制单日期" prop="createDate">
|
|
|
<el-date-picker
|
|
|
v-model="mainForm.createDate"
|
|
|
+ readonly
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 100%;"
|
|
@@ -134,28 +138,53 @@
|
|
|
|
|
|
<div class="main-title">
|
|
|
<div class="title">货品信息</div>
|
|
|
- <el-button type="primary" size="small" icon="el-icon-plus">添加货品</el-button>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px">
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
|
- <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
|
+ <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
|
<el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
<el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="物料代码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="工程登录数量" prop="qty" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="订单金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="返利类型" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="使用返利金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="格力折扣" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="现金钱包" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="税率" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="总仓库" prop="status1" min-width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.status1 | status1Filter }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="仓库状态" prop="status2" min-width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ status2Filter(scope.row) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" width="100" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -169,25 +198,148 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 工程登录列表 -->
|
|
|
+ <el-dialog title="工程登录列表" :visible.sync="isShowDialog" width="70%" :close-on-click-modal="false">
|
|
|
+ <el-form ref="screenForm" :model="screenForm" label-width="0" size="small" label-position="left">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
+ <el-form-item prop="loginNum">
|
|
|
+ <el-input v-model="screenForm.loginNum" placeholder="工程登录编号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
+ <el-form-item prop="enginName">
|
|
|
+ <el-input v-model="screenForm.enginName" placeholder="工程项目"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
+ <el-form-item prop="company">
|
|
|
+ <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" 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-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div class="table" style="margin: 10px 0 20px;">
|
|
|
+ <el-table
|
|
|
+ v-loading="dialogTable_listLoading"
|
|
|
+ :data="dialogTable_dataList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%"
|
|
|
+ max-height="270">
|
|
|
+ <el-table-column align="center" label="" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="primary" size="small" @click="chooseItem(scope.row.recordNo)">选择</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" prop="recordNo" label="工程登录编号" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" prop="projectName" label="工程项目" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" prop="useUnit" label="使用单位" show-overflow-tooltip></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="pagination clearfix">
|
|
|
+ <div class="fr">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="dialogTableCurrentChange"
|
|
|
+ :current-page="dialogTable_currentPage"
|
|
|
+ :page-size="dialogTable_pageSize"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="dialogTable_listTotal">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="isShowDialog = false">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getOrderDetail, } from "@/api/supply/engin";
|
|
|
+import { getOrderDetail, getHomeLoginList, getWarehouseList, addHome, editHome, checkStock } from "@/api/supply/engin";
|
|
|
import { getDictList, getTypeList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
|
name: 'HomeForm',
|
|
|
componentName: 'HomeForm',
|
|
|
props: ['listItem'],
|
|
|
+ filters: {
|
|
|
+ status1Filter(val) {
|
|
|
+ if (val === '' || val === null || val === undefined) return '未检查';
|
|
|
+ else if (val === 0) return '无货';
|
|
|
+ else if (val > 0 && val <= 30) return val;
|
|
|
+ else if (val > 30 && val <= 1000) return '有货';
|
|
|
+ else if (val > 1000) return '充足';
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
detailData: {},
|
|
|
mainForm: {
|
|
|
-
|
|
|
+ orderNum: '',
|
|
|
+ orderDate: '',
|
|
|
+ type: '',
|
|
|
+ jxsNum: '',
|
|
|
+ jxsName: '',
|
|
|
+ loginNum: '',
|
|
|
+ enginName: '',
|
|
|
+ loginType: '',
|
|
|
+ factoryNum: '',
|
|
|
+ company: '',
|
|
|
+ saleType: '',
|
|
|
+ contactMan: '',
|
|
|
+ tel: '',
|
|
|
+ phone: '',
|
|
|
+ address: '',
|
|
|
+ greeRemark: '',
|
|
|
+ greeReply: '',
|
|
|
+ remark: '',
|
|
|
+ createMan: '',
|
|
|
+ createDate: '',
|
|
|
+ fileNum: '',
|
|
|
+ },
|
|
|
+ mainFormRules: {
|
|
|
+ orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
|
|
|
+ jxsNum: [{ required: true, message: '请输入经销商编码', trigger: 'blur' }],
|
|
|
+ jxsName: [{ required: true, message: '请输入经销商名称', trigger: 'blur' }],
|
|
|
+ loginNum: [{ required: true, message: '请输入工程登录编号', trigger: 'blur' }],
|
|
|
+ enginName: [{ required: true, message: '请输入工程项目名称', trigger: 'blur' }],
|
|
|
+ loginType: [{ required: true, message: '请输入工程登录类型', trigger: 'blur' }],
|
|
|
+ company: [{ required: true, message: '请输入使用单位', trigger: 'blur' }],
|
|
|
+ contactMan: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
|
|
|
+ tel: [{ required: true, message: '请输入固定电话', trigger: 'blur' }],
|
|
|
+ phone: [{ required: true, message: '请输入移动电话', trigger: 'blur' }],
|
|
|
+ address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
|
|
|
},
|
|
|
salesTypeList: [],
|
|
|
typeList: [],
|
|
|
+ goodsList: [],
|
|
|
+
|
|
|
+ isShowDialog: false, // 工程登录列表 - 弹窗
|
|
|
+ screenForm: {
|
|
|
+ loginNum: '',
|
|
|
+ enginName: '',
|
|
|
+ company: '',
|
|
|
+ },
|
|
|
+ dialogTable_dataList: null, // 工程登录列表 - 列表数据
|
|
|
+ dialogTable_listLoading: true, // 工程登录列表 - 列表加载loading
|
|
|
+ dialogTable_currentPage: 1, // 工程登录列表 - 当前页码
|
|
|
+ dialogTable_pageSize: 10, // 工程登录列表 - 每页数量
|
|
|
+ dialogTable_listTotal: 0, // 工程登录列表 - 列表总数
|
|
|
+
|
|
|
+ warehouseList: [],
|
|
|
+ warehouseValue: '',
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -206,6 +358,7 @@ export default {
|
|
|
created() {
|
|
|
this.getDictList();
|
|
|
this.getSalesTypeList();
|
|
|
+ this.getWarehouseList();
|
|
|
|
|
|
if(this.listItem) {
|
|
|
this.getDetail();
|
|
@@ -213,6 +366,7 @@ export default {
|
|
|
this.mainForm.jxsNum = JSON.parse(localStorage.getItem("supply_user")).customerId;
|
|
|
this.mainForm.jxsName = JSON.parse(localStorage.getItem("supply_user")).customerName;
|
|
|
this.mainForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
|
|
|
+ this.mainForm.createDate = this.getDate();
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -222,6 +376,22 @@ export default {
|
|
|
this.$emit('backListFormDetail');
|
|
|
},
|
|
|
|
|
|
+ getDate() {
|
|
|
+ var date = new Date();
|
|
|
+ var seperator1 = "-";
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ var strDate = date.getDate();
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ if (strDate >= 0 && strDate <= 9) {
|
|
|
+ strDate = "0" + strDate;
|
|
|
+ }
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
+ return currentdate;
|
|
|
+ },
|
|
|
+
|
|
|
// 获取产品大类列表
|
|
|
getDictList() {
|
|
|
getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
|
|
@@ -239,6 +409,16 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 获取仓库列表
|
|
|
+ getWarehouseList() {
|
|
|
+ getWarehouseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: -1
|
|
|
+ }).then((res) => {
|
|
|
+ this.warehouseList = res.data.records;
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取详情
|
|
|
getDetail() {
|
|
|
getOrderDetail({id: this.listItem.id}).then(res => {
|
|
@@ -246,6 +426,91 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 工程登录列表 - 获取列表
|
|
|
+ getHomeLoginList() {
|
|
|
+ getHomeLoginList({
|
|
|
+ pageNum: this.dialogTable_currentPage,
|
|
|
+ pageSize: this.dialogTable_pageSize,
|
|
|
+ recordNo: this.screenForm.loginNum,
|
|
|
+ projectName: this.screenForm.enginName,
|
|
|
+ useUnit: this.screenForm.company,
|
|
|
+ }).then(res => {
|
|
|
+ this.dialogTable_dataList = res.data.records;
|
|
|
+ this.dialogTable_listTotal = res.data.total;
|
|
|
+ this.dialogTable_listLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 工程登录列表 - 打开弹窗
|
|
|
+ openShareDetail() {
|
|
|
+ this.isShowDialog = true;
|
|
|
+ this.dialogTable_currentPage = 1;
|
|
|
+ this.getHomeLoginList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 工程登录列表 - 更改列表当前页
|
|
|
+ dialogTableCurrentChange(val) {
|
|
|
+ this.dialogTable_currentPage = val;
|
|
|
+ this.getHomeLoginList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交筛选表单
|
|
|
+ submitScreenForm() {
|
|
|
+ this.dialogTable_currentPage = 1;
|
|
|
+ this.getHomeLoginList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置筛选表单
|
|
|
+ resetScreenForm() {
|
|
|
+ this.$refs.screenForm.resetFields();
|
|
|
+ this.dialogTable_currentPage = 1;
|
|
|
+ this.getHomeLoginList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 选择工程登录
|
|
|
+ chooseItem(id) {
|
|
|
+ addHome({refEnginRecordNo: id}).then(res => {
|
|
|
+ this.isShowDialog = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除产品
|
|
|
+ deleteItem(index) {
|
|
|
+ this.goodsList.splice(index, 1);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 检查库存
|
|
|
+ checkStock() {
|
|
|
+ if(!this.warehouseValue) {
|
|
|
+ return this.$errorMsg('请选择仓库');
|
|
|
+ }
|
|
|
+ if(!this.goodsList) {
|
|
|
+ return this.$errorMsg('请添加货品');
|
|
|
+ }
|
|
|
+ let ids = [];
|
|
|
+ this.goodsList.forEach(item => {
|
|
|
+ ids.push(item.materialId);
|
|
|
+ })
|
|
|
+ checkStock({
|
|
|
+ correspondId: this.warehouseValue,
|
|
|
+ materialId: ids.join(',')
|
|
|
+ }).then(res => {
|
|
|
+ if(res.data) {
|
|
|
+ this.goodsList.forEach((item, index) => {
|
|
|
+ item.status1 = res.data[index].allStockNum;
|
|
|
+ item.status2 = res.data[index].stockNum;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ status2Filter(item) {
|
|
|
+ if (item.status2 === '' || item.status2 === null || item.status2 === undefined) return '未检查';
|
|
|
+ else if (item.status2 >= item.qty) return '可用';
|
|
|
+ else return '短缺';
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
clickSubmitForm() {
|
|
|
|
|
|
},
|
|
@@ -272,4 +537,12 @@ export default {
|
|
|
padding-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ ::v-deep input::-webkit-outer-spin-button,
|
|
|
+ ::v-deep input::-webkit-inner-spin-button {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ }
|
|
|
+ ::v-deep input[type='number'] {
|
|
|
+ -moz-appearance: textfield;
|
|
|
+ }
|
|
|
</style>
|