|
@@ -117,7 +117,7 @@
|
|
|
type="warning"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
- @click="handlePull"
|
|
|
+ @click="openPullDialog"
|
|
|
v-hasPermi="['biz:invemng:pull']"
|
|
|
>拉取</el-button>
|
|
|
</el-col>
|
|
@@ -238,6 +238,26 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 拉取 dialog -->
|
|
|
+ <el-dialog title="拉取库存" :visible.sync="pullDialog" width="500px" append-to-body>
|
|
|
+ <el-form ref="pullForm" :model="pullForm" :rules="rules" label-width="80px">
|
|
|
+
|
|
|
+ <el-form-item label="商户编号" prop="merchSn">
|
|
|
+ <el-input v-model="pullForm.merchSn" placeholder="请输入商户编号" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="SKU" prop="sku">
|
|
|
+ <el-input v-model="pullForm.sku" placeholder="请输入SKU" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="handlePull">确 定</el-button>
|
|
|
+ <el-button @click="closePullDialog">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -250,6 +270,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 拉取表单
|
|
|
+ pullForm: {},
|
|
|
+ // 拉取数据弹框
|
|
|
+ pullDialog: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -316,6 +340,30 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 打开拉取库存对话框
|
|
|
+ */
|
|
|
+ openPullDialog() {
|
|
|
+ this.resetPullForm();
|
|
|
+ this.pullDialog = true;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 关闭拉取库存对话框
|
|
|
+ */
|
|
|
+ closePullDialog() {
|
|
|
+ this.pullDialog = false;
|
|
|
+ this.resetPullForm();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 清除表单数据
|
|
|
+ */
|
|
|
+ resetPullForm() {
|
|
|
+ this.pullForm = {
|
|
|
+ merchSn: null,
|
|
|
+ sku: null
|
|
|
+ };
|
|
|
+ this.resetForm("pullForm");
|
|
|
+ },
|
|
|
/** 查询库存管理,wms入库回传时,增加库存数列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -345,11 +393,13 @@ export default {
|
|
|
isValidFormat(row, column) {
|
|
|
return this.selectDictLabel(this.isValidOptions, row.isValid);
|
|
|
},
|
|
|
+
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -465,15 +515,24 @@ export default {
|
|
|
},
|
|
|
/** 拉取按钮操作 */
|
|
|
handlePull() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
+ const queryParams = this.pullForm;
|
|
|
+ console.log("传入的拉取参数 => ", queryParams);
|
|
|
// 添加遮罩
|
|
|
- const _this=this
|
|
|
- this.$confirm('是否确认拉取保税仓所有库存?', "警告", {
|
|
|
+ const _this = this;
|
|
|
+
|
|
|
+ this.$confirm('是否确认拉取仓库库存?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(function() {
|
|
|
- return pullInvemng(queryParams,_this);
|
|
|
+ return pullInvemng(queryParams).then(res => {
|
|
|
+ // 关闭对话框
|
|
|
+ _this.closePullDialog();
|
|
|
+ _this.$alert("拉取库存成功...");
|
|
|
+ }).catch(err => {
|
|
|
+ _this.$alert("拉取库存异常...");
|
|
|
+ })
|
|
|
+
|
|
|
}).then(function(){
|
|
|
_this.handleQuery();
|
|
|
})
|