|
|
@@ -175,10 +175,11 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col
|
|
|
:span="8"
|
|
|
v-if="
|
|
|
- pageName == 'QualityInspection' || pageName == 'productionRecords'
|
|
|
+ pageName == 'productionRecords' || pageName == 'QualityInspection'
|
|
|
"
|
|
|
>
|
|
|
<el-form-item label="供应商" required prop="supplierName">
|
|
|
@@ -191,6 +192,17 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8" v-if="pageName == 'QualityInspection'">
|
|
|
+ <el-form-item label="采购订单" required prop="purchaseOrderNo">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="addForm.purchaseOrderNo"
|
|
|
+ @click.native="openOrd"
|
|
|
+ placeholder="请选择"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8" v-if="pageName == 'QualityInspection'">
|
|
|
<el-form-item
|
|
|
label="检查卸车是否到位"
|
|
|
@@ -334,12 +346,16 @@
|
|
|
|
|
|
<parentList
|
|
|
:classType="
|
|
|
- pageName == 'solidWasteRecord' || pageName == 'QualityInspection'
|
|
|
+ pageName == 'solidWasteRecord' ||
|
|
|
+ pageName == 'QualityInspection' ||
|
|
|
+ pageName == 'productionRecords'
|
|
|
? '2'
|
|
|
: '1'
|
|
|
"
|
|
|
:type="
|
|
|
- pageName == 'solidWasteRecord' || pageName == 'QualityInspection'
|
|
|
+ pageName == 'solidWasteRecord' ||
|
|
|
+ pageName == 'QualityInspection' ||
|
|
|
+ pageName == 'productionRecords'
|
|
|
? '19'
|
|
|
: '17'
|
|
|
"
|
|
|
@@ -357,6 +373,10 @@
|
|
|
>
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
</template>
|
|
|
+ <orderListDialog
|
|
|
+ ref="orderListDialogRef"
|
|
|
+ @changeParent="orderListDialogSuccess"
|
|
|
+ ></orderListDialog>
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -368,15 +388,19 @@
|
|
|
getById
|
|
|
} from '@/api/recordRules/index.js';
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
+ import orderListDialog from '@/components/orderListDialog/orderListDialog.vue';
|
|
|
import { getUserPage } from '@/api/system/organization';
|
|
|
import { getteampage, getTeam } from '@/api/main/index.js';
|
|
|
import WithView from '@/components/upload/WithViewNew.vue';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
+ import { getTableList } from '@/api/purchasingManage/purchaseOrder';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
deptSelect,
|
|
|
parentList,
|
|
|
+ orderListDialog,
|
|
|
WithView
|
|
|
},
|
|
|
props: {
|
|
|
@@ -460,7 +484,9 @@
|
|
|
supplierId: '',
|
|
|
supplierName: '',
|
|
|
productLineId: null,
|
|
|
- productLineName: ''
|
|
|
+ productLineName: '',
|
|
|
+ purchaseOrderId: '',
|
|
|
+ purchaseOrderNo: ''
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
@@ -505,7 +531,7 @@
|
|
|
const start = new Date(this.addForm.checkStartTime).getTime();
|
|
|
const finish = new Date(value).getTime();
|
|
|
const now = Date.now();
|
|
|
- if (finish <= start) {
|
|
|
+ if (finish < start) {
|
|
|
callback(new Error('报工时间必须大于检查开始时间'));
|
|
|
} else if (finish > now) {
|
|
|
callback(new Error('报工时间不能超过当前时间'));
|
|
|
@@ -534,7 +560,12 @@
|
|
|
executeUsersIds: [
|
|
|
{ required: true, message: '请选择', trigger: 'blur' },
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ purchaseOrderNo: [
|
|
|
+ { required: true, message: '请选择', trigger: 'blur' },
|
|
|
+ { required: true, message: '请选择', trigger: 'change' }
|
|
|
]
|
|
|
+
|
|
|
// productLineId: [
|
|
|
// { required: true, message: '请选择场站', trigger: 'blur' },
|
|
|
// { required: true, message: '请选择场站', trigger: 'change' }
|
|
|
@@ -670,6 +701,21 @@
|
|
|
this.addForm.contactId = data.id;
|
|
|
this.addForm.supplierName = data.name;
|
|
|
this.addForm.supplierId = data.id;
|
|
|
+ if (this.pageName == 'QualityInspection') {
|
|
|
+ //来煤获取采购订单
|
|
|
+ getTableList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999,
|
|
|
+ orderStatus: 2,
|
|
|
+ isOutsourcing: 1,
|
|
|
+ partbId: data.id
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.list?.length == 1) {
|
|
|
+ this.addForm.purchaseOrderId = res.list[0].id;
|
|
|
+ this.addForm.purchaseOrderNo = res.list[0].orderNo;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
// 获取工单详情
|
|
|
async getOrderDetials(id) {
|
|
|
@@ -704,10 +750,51 @@
|
|
|
}
|
|
|
return i;
|
|
|
});
|
|
|
- // this.$util.assignObject(this.addForm, data);
|
|
|
+ // <el-col :span="8">
|
|
|
+ // <el-form-item label="检查时间" required prop="checkStartTime">
|
|
|
+ // <el-date-picker
|
|
|
+ // v-model="addForm.checkStartTime"
|
|
|
+ // type="datetime"
|
|
|
+ // format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ // value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ // placeholder="选择日期"
|
|
|
+ // style="width: 100%"
|
|
|
+ // :picker-options="{
|
|
|
+ // disabledDate: (time) => time.getTime() > Date.now()
|
|
|
+ // }"
|
|
|
+ // >
|
|
|
+ // </el-date-picker>
|
|
|
+ // </el-form-item>
|
|
|
+ // </el-col>
|
|
|
+ // <el-col :span="8">
|
|
|
+ // <el-form-item label="报工时间" required prop="checkFinishTime">
|
|
|
+ // <el-date-picker
|
|
|
+ // v-model="addForm.checkFinishTime"
|
|
|
+ // type="datetime"
|
|
|
+ // format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ // value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ // placeholder="选择日期"
|
|
|
+ // style="width: 100%"
|
|
|
+ // :picker-options="{
|
|
|
+ // disabledDate: (time) => time.getTime() > Date.now()
|
|
|
+ // }"
|
|
|
+ // >
|
|
|
+ // </el-date-picker>
|
|
|
+ // </el-form-item>
|
|
|
+ // </el-col>
|
|
|
Object.assign(this.addForm, data);
|
|
|
this.addForm.unloadCheckStatus = this.addForm.unloadCheckStatus || 1;
|
|
|
|
|
|
+ this.addForm.checkStartTime =
|
|
|
+ this.addForm.checkStartTime ||
|
|
|
+ dayjs(new Date()).format('YYYY-M-D HH:mm:ss');
|
|
|
+ this.addForm.checkFinishTime =
|
|
|
+ this.addForm.checkFinishTime ||
|
|
|
+ dayjs(new Date()).format('YYYY-M-D HH:mm:ss');
|
|
|
+ console.log(
|
|
|
+ this.addForm.checkStartTime,
|
|
|
+ 'this.addForm.checkStartTime'
|
|
|
+ );
|
|
|
// 处理数据
|
|
|
this.addForm.executeUsersIds = this.addForm.executeUsers
|
|
|
.map((i) => i.userId)
|
|
|
@@ -768,6 +855,17 @@
|
|
|
this.loading = false;
|
|
|
}
|
|
|
},
|
|
|
+ openOrd() {
|
|
|
+ if (!this.addForm.supplierId) {
|
|
|
+ this.$message.warning('请先选择供应商!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$refs.orderListDialogRef.open(this.addForm.supplierId);
|
|
|
+ },
|
|
|
+ orderListDialogSuccess(data) {
|
|
|
+ this.addForm.purchaseOrderId = data.id;
|
|
|
+ this.addForm.purchaseOrderNo = data.orderNo;
|
|
|
+ },
|
|
|
setValue() {
|
|
|
if (this.title == '报工') {
|
|
|
this.addForm.detailList.forEach((item, index) => {
|