|
@@ -43,13 +43,13 @@
|
|
|
@current-change="dataList"
|
|
|
@selection-change="selectionChange1"
|
|
|
>
|
|
|
-<!-- <template #menu="{ size, row, index }">
|
|
|
- <el-button type="primary" link size="small" @click="outMaterial()"
|
|
|
+ <template #menu="{ size, row, index }">
|
|
|
+ <el-button type="primary" link size="small" @click="outMaterial(row)"
|
|
|
><i-ep-view />出库</el-button>
|
|
|
- </template>-->
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
<div class="dialog-footer" style="align-items: center;text-align: center;margin-top: 5px;">
|
|
|
- <el-button type="primary" @click="outMaterial"> 确定</el-button>
|
|
|
+ <el-button type="primary" @click="cancelDialog">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -83,57 +83,58 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const typeList = ref([
|
|
|
{"label": "一类库","value": "1"},{"label": "二类库","value": "2"}
|
|
|
])
|
|
|
-const outMaterial = () => {
|
|
|
- if(clickObjs.value.length == 0){
|
|
|
+const cancelDialog = () =>{
|
|
|
+ emit("searchMaterials", [])
|
|
|
+}
|
|
|
+const outMaterial = (value) => {
|
|
|
+ /*if(clickObjs.value.length == 0){
|
|
|
ElMessage.error("请选择需要出库的物料")
|
|
|
return;
|
|
|
- }
|
|
|
- let pass = true
|
|
|
- clickObjs.value?.forEach((value) => {
|
|
|
+ }*/
|
|
|
+ // clickObjs.value?.forEach((value) => {
|
|
|
if(!value.outNum){
|
|
|
ElMessage.error("请输入要出库的数量")
|
|
|
- pass = false
|
|
|
return;
|
|
|
}
|
|
|
- if(value.outNum > value.num){
|
|
|
+ if(value.outNum > value.materialCount){
|
|
|
ElMessage.error("出库数量不能大于库存数量")
|
|
|
- pass = false
|
|
|
return;
|
|
|
}
|
|
|
value.materialNo = value.materialCode;
|
|
|
value.num = value.outNum;
|
|
|
value.id = null
|
|
|
+ /// });
|
|
|
+ /*if(pass){
|
|
|
+
|
|
|
+ }*/
|
|
|
+ ElMessageBox.confirm("你确定要出库当前物料吗", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ const params = {
|
|
|
+ outType: search.value.level,
|
|
|
+ type: 2,
|
|
|
+ state: 1,
|
|
|
+ houseNo: 1,
|
|
|
+ detailsList: [{...value}]
|
|
|
+ }
|
|
|
+ outSingle(params).then((res)=>{
|
|
|
+
|
|
|
+ })
|
|
|
});
|
|
|
- if(pass){
|
|
|
- ElMessageBox.confirm("你确定要出库当前物料吗", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- const params = {
|
|
|
- outType: search.value.level,
|
|
|
- type: 2,
|
|
|
- state: 1,
|
|
|
- hosueNo: 1,
|
|
|
- detailsList: clickObjs.value
|
|
|
- }
|
|
|
- outSingle(params).then((res)=>{
|
|
|
- emit("searchMaterials", clickObjs.value)
|
|
|
- })
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: false,
|
|
|
- selection: true,
|
|
|
+ selection: false,
|
|
|
addBtn: false,
|
|
|
search: false,
|
|
|
searchBtn: false,
|
|
|
viewBtn: false,
|
|
|
editBtn: false,
|
|
|
- menu: false,
|
|
|
+ menu: true,
|
|
|
cellBtn: false,
|
|
|
column: [
|
|
|
{
|
|
@@ -148,6 +149,12 @@ option.value = Object.assign(option.value, {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "mes订单号",
|
|
|
+ prop: "mesOrderNo",
|
|
|
+ readonly: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "库存数量",
|
|
|
prop: "materialCount",
|
|
|
type: 'number',
|